/    Sign up×
Community /Pin to ProfileBookmark

implement control panel . How ?

Hey Guys ….
I will implement control panel for my home site
I have 6 Sections :
– Items .
– comments .
– Sections .
– users ( Adding new users ) .
– users log .
There is 3 Levels of Users >>>
Admin : can Access All sections .
moderator : can access all sections Except users section if the admin give him the rights .
user : Only Can access items section .

The Question is : What is the best method to implement it?
I have one method Which is :
in the user table I added column for each section with boolean type if field is true for specific section then he can access the section .
Is there other method Better than this method .

Best Wishes ….

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@sherriMay 17.2004 — By section do you mean section on the site? Or a "level" of access / an activity?

You won't want to hard code your site sections into your DB. I would do a column for each activity... like "modify users", "add content", "edit content", etc. This way you can shuffle your site around and not mess with the db tables.
Copy linkTweet thisAlerts:
@GS300authorMay 17.2004 — Thank's sherri for your interest . ?

your suggestion is great but the problem is :

I want some activity to be applied on some sections not all .

For Example :

If I want to give user X right to modify comments seection only

in your mehthod as I understood it the user will get modify right for all sections .

How Can I Solve this problem ?

Is there a method (for example ) to give each section number and store this number on modify record ?
×

Success!

Help @GS300 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.1,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...