Skip to content
This repository was archived by the owner on Feb 28, 2025. It is now read-only.
This repository was archived by the owner on Feb 28, 2025. It is now read-only.

User update removes all user roles (removeUserRole A bug has occurred to remove all user-roles) #114

@DenisYin66

Description

@DenisYin66

I am trying to update my user role information. There is no problem adding a new user role. Once a role is deleted, all user-roles will be deleted.

My solution:
`
package grails.plugin.springsecurity.ui.SpringSecurityUiService 445

@Transactional
Number removeUserRole(def u, def r) {
            if (u != null && r != null) {
	      UserRole.where { user == u && role == r }.deleteAll() as int
            }
}

`

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions