Open LaserUnicorns opened 7 years ago
It would be nice to have some mechanism for nesting permission options (sref, except, only, authorized/unauthorized methods).
For example
<!-- defines context --> <div permission-context permission-only="'dashboard.view'"> <h1>Hello!</h1> <!-- defines nested context and partially(?) overrides options --> <div permission-context permission-only="'dashboard.edit'"> <!-- uses permission from context --> <input permission> <button permission><button> <!-- partially overrides context options --> <input type="password" permission permission-only="'dashboard.editPassword'"> </div> </div>
That way we can write reusable permissions-aware components without explicitly specifying permissions/roles in them. Also reduces boilerplate when we have many elements with the same permissions.
It would be nice to have some mechanism for nesting permission options (sref, except, only, authorized/unauthorized methods).
For example
That way we can write reusable permissions-aware components without explicitly specifying permissions/roles in them. Also reduces boilerplate when we have many elements with the same permissions.