Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Folder/Document - Access rights
04-06-2011, 07:56 PM,
#1
Folder/Document - Access rights
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





Reply
04-07-2011, 03:44 PM,
#2
RE: Folder/Document - Access rights
(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
Reply
04-07-2011, 04:01 PM,
#3
RE: Folder/Document - Access rights
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


Reply
04-08-2011, 11:45 PM,
#4
RE: Folder/Document - Access rights
(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

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)

Contact Us | LetoDMS Community Forum | Return to Top | | Lite (Archive) Mode | RSS Syndication