Issue 13474

Add security pieces for machine tag

13474
Reporter: trobertson
Assignee: kbraak
Type: Task
Summary: Add security pieces for machine tag
Description: There are TODO / Fixmes in the code, linking to this issue for the machine tag.  These can't be fixed until security is present.
Priority: Critical
Resolution: Fixed
Status: Closed
Created: 2013-07-04 15:36:13.33
Updated: 2013-12-16 17:50:59.435
Resolved: 2013-12-12 14:05:37.027


Author: kbraak@gbif.org
Created: 2013-12-12 14:05:37.083
Updated: 2013-12-12 14:05:37.083
        
Security for MachineTags has been added.

From BaseNetworkEntityResource:

{code}
      if (!security.isUserInRole(UserRoles.ADMIN_ROLE)
              && !userAuthService.allowedToModifyNamespace(security.getUserPrincipal(), machineTag.getNamespace())) {
          throw new WebApplicationException(Response.Status.FORBIDDEN);
      }
{code}