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

Cannot Add a role to a user ( new or existing user ) #2235

Closed
HijenHEK opened this issue May 11, 2022 · 2 comments
Closed

Cannot Add a role to a user ( new or existing user ) #2235

HijenHEK opened this issue May 11, 2022 · 2 comments
Assignees
Labels

Comments

@HijenHEK
Copy link
Contributor

HijenHEK commented May 11, 2022

Description
Orchid provides roles to group permissions and adds them to a certain user.
the issue is I cannot add a role to an existing user or create a new user with a role.

To Reproduce
Steps to reproduce the behavior:

  1. got to the users list
  2. select a user to edit ( or click new user )
  3. add a role to it

Expected behavior
a role should be assigned to the user

Screenshots
Issue face when trying to update:

image

Issue faced when creating a new user with a role:

image

@czernika
Copy link
Contributor

@HijenHEK looks like it more about mass assignment problem within your User model. You're basically allowing roles field to be filled. Edit your protected $fillable property so it didn't contain roles (or maybe you have empty $guarded)

tabuna added a commit that referenced this issue May 15, 2022
@tabuna
Copy link
Member

tabuna commented May 15, 2022

Should work with guarded properties since version 12.4.4

@tabuna tabuna closed this as completed May 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

3 participants