Hi folks!!

During my revision of widgets.php i see permission and don't understand
it...
Now, i understand less than quarter of aiki, but in some parts i can make
easy and quickly changes ( see for example regex in router).

in permission, i see an opportunity of  this easy change. Now widget are
filtered by get_widget_id (widget.php), that makes a basic filter (only
active widgets).
Now is:    $searchSQL=    "SELECT id FROM aiki_widgets WHERE {$fieldTest}
AND is_active='1' LIMIT 1" ;
And with this:
        $searchSQL=
              "SELECT id FROM aiki_widgets ".
              "WHERE {$fieldTest} AND is_active='1'" ;
             " ( widget_group=0 or widget_group= " . membership->user_group
)"
             " LIMIT 1"
we can define groups of users: editors, author, translators,who have access
to a group of specified widgets.
Also we can do a menu for normal user, other for editors, other for
authors....We don't need more the abuse of SYTEMGOD for all.

the other two  probles are different:
- only aiki admin must edit aiki admin widget? It's easy if we have reserved
ids for them.
- who can edit widgets?
It's strange than an editor of a site, must make its jobs and also make its
widgets for doing the job. So i prefer, than only admin can edit widget.
Else, if prefer assign a global rule (a field in aiki_groups as
can_edit_own_widgets) to groups...


Roger


PD:
1) About widget_group, some questions must be defined:
a)¿ cascading privileges?  easy::  widget_group=0 or widget_group <=
membership->user_group
In this case guest user group must be 99.

b) non cascading?  filter: (widget_group=0 or widget_group =
membership->user_group )

c) more than one group access ( widget_group="" or  widget_group like ( %|
membership->user_group|%")...
widget_groups must be: "|1|2|" or |2|12|....

2) i don't know exactly the idea of permission like unix...but it's sound
good..
_______________________________________________
Mailing list: https://launchpad.net/~aikiframework-devel
Post to     : aikiframework-devel@lists.launchpad.net
Unsubscribe : https://launchpad.net/~aikiframework-devel
More help   : https://help.launchpad.net/ListHelp

Reply via email to