You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am unable to create users unless I have logged in using default Admin credentials. I have tried this with both UI and POSTMAN, to the same effect.
I have tested it with a fresh sails project with just sails-auth and sails-permissions modules added.
The text was updated successfully, but these errors were encountered:
If you use sails-auth in combination with sails-permission, you can add this in policies.js
UserController: {
create: [],
'*': [
'basicAuth',
'passport',
'sessionAuth',
'ModelPolicy',
'AuditPolicy',
'OwnerPolicy',
'PermissionPolicy',
'RolePolicy',
'CriteriaPolicy'
]
}
This will allow you to create a user without being loged in. The created used will have the registered role.
I'm having the same problem here. Thanks to @nolife9face we have a working workaround. But wouldn't be a more 'correct' way to change the PermissionPolicy so that if the user isn't registered it should be treated like 'public' role? That way, we would grant the permissions we would want for unregistered users using the PermissionService, for example on '.config/bootstrap.js'.
I am unable to create users unless I have logged in using default Admin credentials. I have tried this with both UI and POSTMAN, to the same effect.
I have tested it with a fresh sails project with just sails-auth and sails-permissions modules added.
The text was updated successfully, but these errors were encountered: