daostack / access_control

GNU General Public License v3.0
1 stars 1 forks source link

key can be used twice if specified in more than one `only` #8

Closed tsuberim closed 6 years ago

tsuberim commented 6 years ago

For example if you want to restrict to Admin || (Alice && Bob), you'd have to write:

function f() only(["Admin", "Alice"]) only(["Admin", "Bob"]) { ... }

And the Admin key will be used twice if available.

So I guess we need a better way to express boolean predicates and evaluate them efficiently.

ben-kaufman commented 6 years ago

Current syntax allows complex boolean like: only(unlock("Admin") || (unlock("Alice") && unlock("Bob"))) so I think we can close this issue.