snimavat / nimble

Nimble Security Grails Plugin
Other
15 stars 19 forks source link

removepermission links generated wrong #61

Closed tealsoftware closed 7 years ago

tealsoftware commented 9 years ago

The remove permission button generates the following JavaScript:

<a href="javascript:" onclick="removePermission('6974', '7,794');" class="btn btn-danger btn-mini"><i class="icon-remove icon-white"></i>Remove</a>

This leads to "The permission identified by null could not be removed as it does not exist" error.

Note the "comma" in the middle of the permission ID, I think this should not be there.

I think the problem is in plugins\nimble-0.7\grails-app\views\templates\admin_permissions_list.gsp line 34

<a href="javascript:" onClick="removePermission('${parent.id.encodeAsHTML()}', '${g.fieldValue(bean:perm, field:'id')}');" class="btn btn-danger btn-mini">