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:
Saša Živkov
2015-02-16 16:32:18 +01:00
parent cf1b06a39f
commit b36f701c74

View File

@@ -133,10 +133,10 @@ public class GroupControl {
* server administrators.
*/
return user instanceof InternalUser
|| user.memberOf(group.getGroupUUID())
|| isOwner()
|| groupBackend.isVisibleToAll(group.getGroupUUID())
|| user.getCapabilities().canAdministrateServer()
|| groupBackend.isVisibleToAll(group.getGroupUUID());
|| isOwner()
|| user.memberOf(group.getGroupUUID());
}
public boolean isOwner() {