Added permission check to make sure users are allowed to edit system permissions.