Do cheaper checks first in GroupCountrol.isVisible
Reorder the checks so that the cheaper ones are executed first. This avoids or postpones more expensive checks as much as possible. Change-Id: I3e38d5840936f0b5ce14c16fe22e6ac363b256b9
This commit is contained in:
@@ -133,10 +133,10 @@ public class GroupControl {
|
|||||||
* server administrators.
|
* server administrators.
|
||||||
*/
|
*/
|
||||||
return user instanceof InternalUser
|
return user instanceof InternalUser
|
||||||
|| user.memberOf(group.getGroupUUID())
|
|| groupBackend.isVisibleToAll(group.getGroupUUID())
|
||||||
|| isOwner()
|
|
||||||
|| user.getCapabilities().canAdministrateServer()
|
|| user.getCapabilities().canAdministrateServer()
|
||||||
|| groupBackend.isVisibleToAll(group.getGroupUUID());
|
|| isOwner()
|
||||||
|
|| user.memberOf(group.getGroupUUID());
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isOwner() {
|
public boolean isOwner() {
|
||||||
|
|||||||
Reference in New Issue
Block a user