We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Here is my code
import IAM, { Resource, Role, Group, User, Right } from '@author.io/iam'; IAM.createResource('user', ['create', 'read', 'update', 'delete', 'list']) IAM.createResource('task', ['create', 'read', 'update', 'delete', 'list']) IAM.createRole('admin', { 'user': ['create', 'read', 'update', 'delete', 'list'], 'task': ['create', 'read', 'update', 'delete', 'list'], }) console.log(await IAM.resources) console.log(await IAM.roles)
Output is [ Resource {}, Resource {} ] [ Role {}, Role {} ]
Issue: Resources and Roles are creating but not getting in the list. Output have blank objects. Can anyone provide the solution for this?
The text was updated successfully, but these errors were encountered:
Finally I got the solution. Below code resolve my issue.
let allResources = IAM.resources.map(resource => resource.data); let allRoles = IAM.roles.map(role => role.data); console.log(JSON.stringify(allRoles)) console.log(JSON.stringify(allRoles))
Sorry, something went wrong.
No branches or pull requests
Here is my code
Output is
[ Resource {}, Resource {} ]
[ Role {}, Role {} ]
Issue: Resources and Roles are creating but not getting in the list. Output have blank objects.
Can anyone provide the solution for this?
The text was updated successfully, but these errors were encountered: