Re: checkAccess method in DataObjectMaster ?
mikespub <[email protected]> Fri, 02 Apr 2010 22:53:05 +0200
| Newsgroups | gmane.comp.cms.xaraya.devel |
|---|---|
| Organization | Xaraya |
| Message-ID | <[email protected]> |
On 1/04/2010 11:01, mikespub wrote: > Why is the checkAccess method in DataObjectMaster related to blocks ? > There doesn't seem to be any place where this is actually used today, > and I don't see the link with blocks either. > > Note: I don't really have a problem with having such a method to check > access for object actions (view/display/create/update/delete/config/...) > in general for the future, e.g. to replace the xarSecurityCheck(...) > calls in the object UI handlers with simpler $object->checkAccess(...) > calls. > > But then the link to blocks would need to disappear, and we'd need to > expand the number of actions too ;-) > > So what was the idea here ? > > Mike. In the meantime I've started calling checkAccess() in the DD UI classes too, but still using the existing xarSecurityCheck() calls inside that method. That way we can change how access is determined later on if we want to. The existing GUI and API functions still rely directly on xarSecurityCheck() - some day I'd like to remove the duplication of code and only keep them as wrappers for corresponding OO methods, so we can clean them up then. And I'd like to get rid of the *DynamicData*Field* masks at some point too, because they don't really show much use at all in practice... What do you think ? Mike.