Posts: 129
Threads: 14
Joined: Jul 2010
Reputation:
0
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
Group B
Folder access right- Group A -> READ
- Group B -> READ + WRITE
With letoDMS : "user 1" can't write in folder
Posts: 431
Threads: 15
Joined: Oct 2010
Reputation:
0
(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
Group B
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
Posts: 129
Threads: 14
Joined: Jul 2010
Reputation:
0
Hi
Good
I'm modified it in my installation
classes "LetoDMS_Core_Folder" and "LetoDMS_Core_Document", function getAccessMode
PHP Code:
<?php
foreach ($accessList["groups"] as $groupAccess)
{
if ($user->isMemberOfGroup($groupAccess->getGroup()))
{
return $groupAccess->getMode();
}
}
return $this->getDefaultAccess();
to
PHP Code:
<?php
$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
Posts: 431
Threads: 15
Joined: Oct 2010
Reputation:
0
(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:
<?php
foreach ($accessList["groups"] as $groupAccess)
{
if ($user->isMemberOfGroup($groupAccess->getGroup()))
{
return $groupAccess->getMode();
}
}
return $this->getDefaultAccess();
to
PHP Code:
<?php
$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