AW: AW: [opencms-dev] Is there any method for check write access per group to a folder?

Petr Hollay ph at ethikom.de
Fri Feb 20 18:51:00 CET 2004


Hi,
if we are speaking about 5.0,

> I _think_ that only the permissions of the current group are tested.
no, all groups are checked.

Some tracing into Java: ;-)
CmsObject.accessWrite(String resource) 
calls
CmsResourceBroker.accessWrite(CmsUser currentUser, CmsProject
currentProject, String resourceName)
calls
CmsResourceBroker.accessWrite(CmsUser currentUser, CmsProject
currentProject, CmsResource resource)
Calls
CmsResourceBroker.accessGroup(CmsUser currentUser, CmsProject
currentProject, CmsResource resource, int flags)
calls
CmsResourceBroker.userInGroup(CmsUser currentUser, CmsProject
currentProject, String username, String groupname)

where all indirect groups the user is member of are checked as well.

Requirements are (in CmsResourceBroker.accessWrite()):
- current project is not Online,
- current project is accessible for current user,
- resource belongs to current project,
- resource is not locked by other user,
- if resource is locked by current user, project in which it is locked has
to be current project,
- all parent folder have to be accessible (readable, not locked by other
user, etc.).


It would be useful to post your data as zip file, exported from OpenCms, if
it is possible. Or at least describe your folder structure where you have
this problem, together with owner/group/access flags settings.

Best regards
Petr


-----Ursprüngliche Nachricht-----
Von: opencms-dev-admin at opencms.org [mailto:opencms-dev-admin at opencms.org] Im
Auftrag von M Butcher
Gesendet: Freitag, 20. Februar 2004 18:51
An: opencms-dev at opencms.org
Betreff: Re: AW: [opencms-dev] Is there any method for check write access
per group to a folder?

I _think_ that only the permissions of the current group are tested. If 
a user belongs to two groups, and the currently active group does not 
have permissions to edit the file while the inactive group does, then 
the accessWrite method will return false. I'm not positive about this, 
but it should be easy to test.

Matt

Petr Hollay wrote:
> Hi,
> which OpenCms version are you using?
> 
> This should work in 5.0 without problems, are you sure your folder belongs
> to group your user is member of, and access rights have "w" for group?
> 
> Best regards
> Petr
> 
> 
> -----Ursprüngliche Nachricht-----
> Von: opencms-dev-admin at opencms.org [mailto:opencms-dev-admin at opencms.org]
Im
> Auftrag von Salvador Santander Gutierrez
> Gesendet: Freitag, 20. Februar 2004 15:18
> An: OpenCMS List
> Betreff: [opencms-dev] Is there any method for check write access per
group
> to a folder?
> 
> I want to check if a group has write access to a folder.  The method
> accessWrite in CmsObject returns if the user has writeAccess, but if the
> user belong to a group which has write access to the folder, the method
> returns false instead of true.
> 
> Thanks.
> 
> _______________________________________________
> This mail is send to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://mail.opencms.org/mailman/listinfo/opencms-dev
> 
> _______________________________________________
> This mail is send to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://mail.opencms.org/mailman/listinfo/opencms-dev

_______________________________________________
This mail is send to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
http://mail.opencms.org/mailman/listinfo/opencms-dev




More information about the opencms-dev mailing list