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

Unclear what the video - title attribute does in the example #61

Open
spotlesscoder opened this issue Nov 7, 2021 · 2 comments
Open

Comments

@spotlesscoder
Copy link

The sample contains this code

roles
  .grant(AppRoles.USER_CREATE_ANY_VIDEO) // define new or modify existing role. also takes an array.
    .createOwn('video') // equivalent to .createOwn('video', ['*'])
    .deleteOwn('video')
    .readAny('video')
  .grant(AppRoles.ADMIN_UPDATE_OWN_VIDEO) // switch to another role without breaking the chain
    .extend(AppRoles.USER_CREATE_ANY_VIDEO) // inherit role capabilities. also takes an array
    .updateAny('video', ['title']) // explicitly defined attributes
    .deleteAny('video');

What exactly does the title attribute do in the "updateAny" line?
Where is it checked?

@shekohex
Copy link
Member

shekohex commented Nov 8, 2021

it would allow you to define which attribute that role can update, for example, you can define they can only update the title of the video, but say, not the description of the video.

@spotlesscoder
Copy link
Author

Could you please add a code sample? Still don't get it exactly how I would use it

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

2 participants