Admin Access: Customising Menu

15 posts by 3 authors in: Forums > CMS Builder
Last Post: April 4, 2012   (RSS)

By gversion - September 16, 2010

Hello,

I would like to be able to change the menu items that appear in the Admin control panel depending on the user Access Level.

I have already installed the Membership Add-on, although I'm unsure if this is required.

Can someone please explain how I achieve this?

Thank you,
Greg

Re: [gversion] Admin Access: Customising Menu

By Chris - September 16, 2010

Hi Greg,

You can restrict specific user accounts to certain sections in the Account section. Modify an account and set the Section Access to "By Section". Users who have sections set to "None" will not see them in the menu.

Does that help? Please let me know if you have any questions.
All the best,
Chris

Re: [chris] Admin Access: Customising Menu

By gversion - September 17, 2010

Hi Chris,

Thanks for the clear instructions. I have been able to edit "specific" users now.

It appears that when a user registers they are assigned an Admin Access value of "0". How can I change the default settings for this Admin Access?

Also is it possible to setup other Admin Access level, for example a value of "2"?

Thank you,
Greg

Re: [gversion] Admin Access: Customising Menu

By Jason - September 17, 2010

Hi Greg,

Admin access (isAdmin) is stored as a check box in User accounts, and therefore has a value of either 1 or 0.

If you could clarify what other access levels would be for, we can see what solutions we can come up with.

Hope this helps.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] Admin Access: Customising Menu

By gversion - September 17, 2010

Hi Jason,

Thinking about it a bit more, I don't really need additional types of Admin access so don't worry about that.

However, what is important to me is being able to define the "default" Section Access settings for a user with an Admin Access value of "0".

I would like users with a value of "0" for their Access Level to have Section Access set as follows:

All Sections: By Section
Listings: Author
Homepages: None
Category: None

I am really grateful for your help.

Thank you,
Greg

Re: [gversion] Admin Access: Customising Menu

By Jason - September 17, 2010

Hi Greg,

Take a look at this post:
http://www.interactivetools.com/forum/gforum.cgi?post=80115#80115

It goes over how to set access permission for different tables by adding to the accesslist table.

Hope this helps.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] Admin Access: Customising Menu

By gversion - September 17, 2010

Hi Jason,

Thanks for the reply. You are certainly pointing me in the right direction.

I understand the way the settings work now, but how do I define the "default" settings for when a new user is created? Can you help explain this please?

The post at the URL below is requesting the same functionality so I'd be interested to hear if a solution was developed:

http://www.interactivetools.com/forum/gforum.cgi?post=82543

Thank you,
Greg

Re: [gversion] Admin Access: Customising Menu

By Chris - September 17, 2010

Hi Greg,

There's no way to do this right now, but it would be possible through some custom programming. We could develop a plugin for you which would set new user accounts to have some default selections made from the dropdowns. Please let me know if this is something you're interested in.

In the future, I'd love to implement "access groups" and provide a default for new users. That's probably a long way off, however.

I hope this helps. Please let me know if you have any questions.
All the best,
Chris

Re: [chris] Admin Access: Customising Menu

By gversion - September 17, 2010

Hi,

Is it not possible to define the settings in signup.php so that by default when a new user is created they are assigned Author status for the Listings table?

mysql_query("INSERT INTO `{$TABLE_PREFIX}_accesslist`
(userNum, tableName, accessLevel, maxRecords, randomSaveId)
VALUES ($userNum, 'all', '1', NULL, '1234567890'),
($userNum, 'cms_listings', '6', NULL, '1234567890'),
($userNum, '_sample', '6', 1, '1234567890'),
($userNum, '_sample', '6', 1, '1234567890')") or die("MySQL Error Creating Access List:<br/>\n". htmlspecialchars(mysql_error()) . "\n");

//


The code above is what I have used to try and define the accesslist so that the user will be an Author of the Listings table but it doesn't seem to be working.

Can you help any further with this please?

Thank you,
Greg