Grails 3.3.9 spring security 3.2.3 spring security ui 3.1.2 无法更改用户数据
Grails 3.3.9 spring security 3.2.3 spring security ui 3.1.2 cannot change user data
在 Grails 3.3.9 上使用 Spring Security core 3.2.3 我可以在 BootStrap.groovy 中添加一个用户,例如:
User u1 = new User(username: 'testuser1', password: 'finkaroney', email: 'any@any.com')
Role sur = Role.findByAuthority('ROLE_USER')
u1.save(flush: true)
UserRole.create(u1, sur, true)
现有用户也可以毫无问题地登录和注销。
使用Spring Security UI 3.1.2 的界面,我可以列出用户、角色等
但是对于 S2UI 3.1.2 我不能:
- 添加用户
- 删除用户
- 修改一个用户的参数,例如enabled,accountExpired等等
当我尝试执行这些操作时,通常会在浏览器右上角弹出一条消息 window。
例如,如果我尝试删除一个用户,我会看到这个弹出窗口
Oops! That may not have been deleted. Either the form was submitted twice or possible CSRF attempt. Be careful what you click.
或者如果我试图让用户过期,我会看到这个弹出窗口
testuser1 may not have been updated. Either the form was submitted twice or possible CSRF attempt. Be careful what you click.
果然第一种情况用户没有被删除,第二种情况s/he没有过期
在我使用 运行 Grails 的 window 中没有崩溃或任何其他相关消息。
此应用程序已经经历了 Grails 和 Groovy 的几个次要和主要版本,因此如果某处出现一些问题,我不会感到惊讶。但我不确定从哪里或如何开始寻找此类问题。
经过大量检查和诅咒之后,我今天才注意到 gradle.properties 中报告的 Grails 版本设置为 3.3.3 而不是 3.3.9。更正后,我的 UI 现在可以正确更改和删除用户。
在 Grails 3.3.9 上使用 Spring Security core 3.2.3 我可以在 BootStrap.groovy 中添加一个用户,例如:
User u1 = new User(username: 'testuser1', password: 'finkaroney', email: 'any@any.com')
Role sur = Role.findByAuthority('ROLE_USER')
u1.save(flush: true)
UserRole.create(u1, sur, true)
现有用户也可以毫无问题地登录和注销。
使用Spring Security UI 3.1.2 的界面,我可以列出用户、角色等
但是对于 S2UI 3.1.2 我不能:
- 添加用户
- 删除用户
- 修改一个用户的参数,例如enabled,accountExpired等等
当我尝试执行这些操作时,通常会在浏览器右上角弹出一条消息 window。
例如,如果我尝试删除一个用户,我会看到这个弹出窗口
Oops! That may not have been deleted. Either the form was submitted twice or possible CSRF attempt. Be careful what you click.
或者如果我试图让用户过期,我会看到这个弹出窗口
testuser1 may not have been updated. Either the form was submitted twice or possible CSRF attempt. Be careful what you click.
果然第一种情况用户没有被删除,第二种情况s/he没有过期
在我使用 运行 Grails 的 window 中没有崩溃或任何其他相关消息。
此应用程序已经经历了 Grails 和 Groovy 的几个次要和主要版本,因此如果某处出现一些问题,我不会感到惊讶。但我不确定从哪里或如何开始寻找此类问题。
经过大量检查和诅咒之后,我今天才注意到 gradle.properties 中报告的 Grails 版本设置为 3.3.3 而不是 3.3.9。更正后,我的 UI 现在可以正确更改和删除用户。