LetoDMS Community Forum
Folder/Document - Access rights - Printable Version

+- LetoDMS Community Forum (https://community.letodms.com)
+-- Forum: LetoDMS Support (https://community.letodms.com/forumdisplay.php?fid=4)
+--- Forum: General Questions (https://community.letodms.com/forumdisplay.php?fid=15)
+--- Thread: Folder/Document - Access rights (/showthread.php?tid=280)



Folder/Document - Access rights - Doudoux - 04-06-2011

Hi

For a folder or a document, it's the first group that gives access rights.
Why does not entitle the least restrictive of all groups?

Sample

Group A
  • user 1
  • user 2

Group B
  • user 1
  • user 3

Folder access right
  • Group A -> READ
  • Group B -> READ + WRITE

With letoDMS : "user 1" can't write in folder








RE: Folder/Document - Access rights - steinm - 04-07-2011

(04-06-2011, 07:56 PM)Doudoux Wrote: Hi

For a folder or a document, it's the first group that gives access rights.
Why does not entitle the least restrictive of all groups?

Sample

Group A
  • user 1
  • user 2

Group B
  • user 1
  • user 3

Folder access right
  • Group A -> READ
  • Group B -> READ + WRITE

With letoDMS : "user 1" can't write in folder

You are right. This should be fixed. I'll try to get it into the final version of 3.0.0.

Uwe



RE: Folder/Document - Access rights - Doudoux - 04-07-2011

Hi

Good

I'm modified it in my installation

classes "LetoDMS_Core_Folder" and "LetoDMS_Core_Document", function getAccessMode

PHP Code:
foreach ($accessList["groups"] as $groupAccess
{
  if (
$user->isMemberOfGroup($groupAccess->getGroup())) 
  {
    return 
$groupAccess->getMode();
  }
}
return 
$this->getDefaultAccess(); 
to
PHP Code:
$result $this->getDefaultAccess();
    
foreach (
$accessList["groups"] as $groupAccess
{
  if (
$user->isMemberOfGroup($groupAccess->getGroup()))
  {
     if (
$groupAccess->getMode()>$result)
       
$result  $groupAccess->getMode();
  }
}

return 
$result

I did not change ACLs on user, I do not think this is necessary :
- first : ACL user
- second : ACL group

Doudoux





RE: Folder/Document - Access rights - steinm - 04-08-2011

(04-07-2011, 04:01 PM)Doudoux Wrote: Hi

Good

I'm modified it in my installation

classes "LetoDMS_Core_Folder" and "LetoDMS_Core_Document", function getAccessMode

PHP Code:
foreach ($accessList["groups"] as $groupAccess
{
  if (
$user->isMemberOfGroup($groupAccess->getGroup())) 
  {
    return 
$groupAccess->getMode();
  }
}
return 
$this->getDefaultAccess(); 
to
PHP Code:
$result $this->getDefaultAccess();
    
foreach (
$accessList["groups"] as $groupAccess
{
  if (
$user->isMemberOfGroup($groupAccess->getGroup()))
  {
     if (
$groupAccess->getMode()>$result)
       
$result  $groupAccess->getMode();
  }
}

return 
$result

I did not change ACLs on user, I do not think this is necessary :
- first : ACL user
- second : ACL group

I commited your code to the svn. It will also be in 3.0.0
Thanks for your support.

Uwe