[dev] Horde Permissions / Howto?
ali mohammed
nefertitian at gmail.com
Tue Aug 2 15:21:26 PDT 2005
Hi,
I was wondering if anybody could help me provide a bit of guidance
with regard to creating custom permissions with the horde framework. I
tried figuring out the source code of perms.php and other related
files but was largely unsuccessful, atleast as of now.
If I am to create a application (say 'appname') and wish to create
custom permissions, somebody mentioned I need to use the
_appname_perms() function in api.php file. Is below a valid pseudo
code to create them? Assume that I am trying to divide the application
access based on 'study' names such as 'study001', 'study002',
'study003', etc.
function _appname_perms() {
...code...code...
}
The above function would then return a $perms array that contains
something like this:
$perms['tree']['appname']['sources']['study_sqldatabasesource']=
$perms['tree']['appname']['sources']['prefs']=
$perms['title']['appname:studies']='appname:studies:study001';
$perms['title']['appname:studies']='appname:studies:study002';
$perms['title']['appname:studies']='appname:studies:study003';
Is the above $perms array correctly defined with regard to the custom
permissions that I need to create?
And assuming it is correct, I was able to create the above custom
perms successfully, how do I check for valid permissions and how do i
edit those perms to add certain groups of users.
Any help on this would be greatly appreciated. I've almost fried my
brain and spent quite a bit of time trying to figure out the code
myself.
Thanks in advance,
Ali.
--
[nefertitian] If the caffiene doesnt kill me, the horde documentation will.
More information about the dev
mailing list