>>  Site Map >>  Forums >>  Unanswered

Forum module - topics in forum:



Unanswered - <font color=red>Posts that are still unaswered (after 7 days) are in here, unless someone provides an answer, then they'll be put back in the relevant forum.</font>



Quick Question: Is it possible to determine if user is god?

I don't suppose there's an existing function within phpnuke which returns whether the logged in user is a super admin user, or do I have to do a query myself to check radminsuper? (would probably stick it in a wrapper function coz I will probably need it in a number of places).

Some background of why I need it, just in case anyone reading might ave some use for it (or not):

Atfer the success of the reviews amendments I made (not many of em, really, just adding the ability to place them in sub categories, and a slight layout change), I've started on something a bit more complex.

I'm in the process of writing some improvements to the stories area, so that I can restrict certain admin users to particular topics/categories when posting new articles to the site. If they don't have access, then the option to post immediately is unavailable, and can only be confirmed by a super user.

When you configure a user to have "News" rights, they can post news to the site in any topic/category combination immediately, which is fine if you trust everyone who you give admin rights to, but ideally I want to limit people to a particular area in some cases.

So, I'm thinking I'll create a new admin page, with a dropdown to select the admin user, and then a series of checkboxes in two seperate boxes, one listing topics, the other listing categories. You then check which ones they have access to. By default, everything will be selected, until you specifically change it.

Only the god admin users would be able to add new topics/categories, whereas I think standard admin users who have "news" permissions can also add categories/topics.

The normal admin users would be able to select any combination in the dropdowns on the news page, but if they pick something they don't have full rights to, it'll store the article contents in a "draft" table, which only the super user has access to. They can then push the story live once they've confirmed it's in the right place.

Sounds good so far doesn't it? Smile I can guess that it's not going to be straight forward, because I think I'm going to need to add checks in a few different places.

so far, I have 2 new tables:

nuke_topics_admin (contains: aid, topicid)
nuke_stories_cat_admin (contains: aid, catid)

these will store which topics/categories a user can post to immediately.

I'm guessing I'll also need a copy of the nuke_stories tables which will store the article draft if it needs confirmation, if they've picked a topic/category that they don't have direct permission to do so.

That's about as far as I've got so far. I'll start the coding side of things tonight: I hope it doesn't take too long Smile






"Super Admin" users are only created by another Super (God) Admin users....

admin.php - Edit Admins.




Attention! You are currently viewing sitemap page!
We strongly suggest to look at original content

Search from web

Valid HTML 4.01 Valid CSS