Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

permissions context #436

Open
LaserUnicorns opened this issue Oct 4, 2017 · 0 comments
Open

permissions context #436

LaserUnicorns opened this issue Oct 4, 2017 · 0 comments

Comments

@LaserUnicorns
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant