Commit bacaf77b authored by Randall Leeds's avatar Randall Leeds

Make an "is equal to 0" check more obvious

parent c6e9a791
...@@ -73,7 +73,7 @@ class Permissions ...@@ -73,7 +73,7 @@ class Permissions
for action, roles of context.permissions or [] for action, roles of context.permissions or []
for role in roles for role in roles
allow = true allow = true
if not role.indexOf('group:') if role.indexOf('group:') is 0
if role == GROUP_WORLD if role == GROUP_WORLD
principal = EVERYONE principal = EVERYONE
else else
...@@ -81,7 +81,7 @@ class Permissions ...@@ -81,7 +81,7 @@ class Permissions
allow = false allow = false
principal = role principal = role
else else
if not role.indexOf('acct:') if role.indexOf('acct:') is 0
principal = role principal = role
else else
allow = false allow = false
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment