Advertisement
Guest User

Untitled

a guest
Apr 20th, 2014
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. package com.example
  2. import grails.plugin.springsecurity.SpringSecurityUtils
  3. class PersonController {
  4. ...
  5. def update() {
  6. Person personInstance = Person.get(params.id)
  7. if (SpringSecurityUtils.ifAllGranted('ROLE_ADMIN') {
  8. bindData(personInstance, params) // exclude nothing
  9. } else {
  10. bindData(personInstance, params, [exclude: ['someSensitiveProperty', 'anotherProp']])
  11. }
  12. }
  13. ...
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement