Maât wrote: > Sigurd Nes a écrit : >> Maât wrote: >> >>> so if i understand well : >>> >>> ( i put the sql definition of location table in footer to help ) >>> >>> the name field uses a dns approach to define locations and sub locations >>> >>> then for a given app the sub locations for .location1 will be : >>> >>> .location1.sublocation1 >>> .location1.sublocation2 >>> .location1.sublocation3 >>> >>> the remaining question is : >>> >>> should this include sub-sub-locations ? >>> >>> for example : >>> >>> .location1.sublocation3.sussublocation1 >>> .location1.sublocation3.sussublocation2 >>> .location1.sublocation3.sussublocation3 >>> >>> iow : >>> -- should i request all name fields beginning with ".location1." (which >>> brings every sublocations) >>> >> Yes - that is the idea. >> You give rights on all locations down the tree inherited from the level you >> are >> operating on. >> >> To add some extra control - you might want to add a flag for >> "enable_inheritance" that you send along from the setting-form (a checkbox) >> >> S >> > the current prototype for get_subs is : > > public function get_subs($appname, $location) > > and it's supposed to return an array of strings :
location_id => name > > (see Line 390 of class.acl.inc.php : > http://svn.savannah.gnu.org/viewvc/core/trunk/phpgwapi/inc/class.acl.inc.php?annotate=18965&root=phpgroupware > ) > > so i dont understand where the flag is supposed to go :-/ > > something like this: if( $this->enable_inheritance ) { $subs = $locations->get_subs($.., $..); foreach ( array_keys($subs) as $sub ) { ... } } Regards Sigurd _______________________________________________ phpGroupWare-developers mailing list phpGroupWare-developers@gnu.org http://lists.gnu.org/mailman/listinfo/phpgroupware-developers