summaryrefslogtreecommitdiff
path: root/src/main/kotlin/io/dico/parcels2/Privilege.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/io/dico/parcels2/Privilege.kt')
-rw-r--r--src/main/kotlin/io/dico/parcels2/Privilege.kt2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/kotlin/io/dico/parcels2/Privilege.kt b/src/main/kotlin/io/dico/parcels2/Privilege.kt
index 040e5f5..72878a9 100644
--- a/src/main/kotlin/io/dico/parcels2/Privilege.kt
+++ b/src/main/kotlin/io/dico/parcels2/Privilege.kt
@@ -88,7 +88,7 @@ interface Privileges : PrivilegesMinimal {
}
fun changePrivilege(key: PrivilegeKey, positive: Boolean, update: Privilege): PrivilegeChangeResult =
- if (key != keyOfOwner) FAIL_OWNER
+ if (key == keyOfOwner) FAIL_OWNER
else if (getStoredPrivilege(key).isChangeInDirection(positive, update)
&& setStoredPrivilege(key, update)
) SUCCESS