assert(!Identity.isSecurityEnabled());
assert(identity.hasRole("admin"));
assert(identity.hasPermission("foo", "bar"));
// This shouldn't throw an exception while security is disabled
identity.checkRestriction("foo");
// Enable security
Identity.setSecurityEnabled(true);
assert(Identity.isSecurityEnabled());
assert(!identity.hasRole("admin"));