access and Right-Management

For Joomla! 1.5 Coding related discussions, please use: http://groups.google.com/group/joomla-dev-general
Locked
mischie
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Mon Aug 28, 2006 9:16 am

access and Right-Management

Post by mischie » Fri Mar 16, 2007 1:05 pm

Hey, guys!
At the moment im still working on my AJAX-based Glossary and now I have (again) a Problem im not able to solve on my own:
I need some kind of right-management, which allows or disallows people registered to the site to edit/delete/whatever explanations in that Glossary.
I do not want to just allow it to "registered" or "special" people but would like to have some kind of own "attribute" which serves as a flag for the glossary to allow or disallow special actions.

I hope, I stated clearly enough, what I'm looking for actually. If not -> Ask me :)

Any help would be greatly appreciated :)

Thanks in advance and greets,
mischie

 
User avatar
ianmac
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 4784
Joined: Sat Sep 24, 2005 11:01 pm
Location: Toronto, Canada

Re: access and Right-Management

Post by ianmac » Fri Mar 16, 2007 1:19 pm

Just add a table say #__glossaryperms that has two fields - a primary key and a user id.  Add a management interface so that the administrator can add and remove entries from the table.

#__glossaryperms
id INT(11)
user_id INT(11)

Then, for your permission check, do: SELECT COUNT(*) FROM #__glossaryperms WHERE user_id = '$user->id'

Then get your number of rows.  If there is a row return, then you have permission, otherwise return denied message.

You can add a third field of you want to do more granular permissions.

Ian

mischie
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Mon Aug 28, 2006 9:16 am

Re: access and Right-Management

Post by mischie » Fri Mar 16, 2007 1:24 pm

thanks for that very fast answer :)

OK, if its not possible to "modify" some Joomla1.5-included rights management (I read something about adding a fourth status next to 0,1 and 2 in the group-table which is unfortunately not longer used...) then I'll build up a right-concept on my own.
By importing existing users from the #__users-table it should do its tasks :)

But once again: thanks for the very fast answer :)

Greets,
mischie

User avatar
tcp
Joomla! Ace
Joomla! Ace
Posts: 1548
Joined: Wed Sep 21, 2005 9:25 am
Location: Thailand
Contact:

Re: access and Right-Management

Post by tcp » Sun Mar 18, 2007 6:06 am

You will probably want to look at the JAuthorization class ( joomla.user.authorization ).

A complete Access Control List feature is slated for J!1.6 .  This is a much-requested feature that will not be fully implemented in 1.5.  However, developers can certainly pursue their own solutions.

tcp
Your solution for a single-page checkout on any website.
http://moolah-ecommerce.com

 

Locked

Return to “Joomla! 1.5 Coding”