Index: jtalks-common-model/src/main/java/org/jtalks/common/model/permissions/ProfilePermission.java IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP <+>package org.jtalks.common.model.permissions;\n\nimport com.google.common.collect.Lists;\nimport ru.javatalks.utils.general.Assert;\nimport javax.annotation.Nonnull;\nimport java.util.List;\n\n/**\n * There are the restrictions that related to common entities.\n *\n * @author Ancient_Mariner\n */\npublic enum ProfilePermission implements JtalksPermission{\n /**\n * The ability of user group or user to send private messages.\n */\n SEND_PRIVATE_MESSAGES(\"1110\",\"SEND_PRIVATE_MESSAGES\"),\n /**\n * The ability of user group or user to edit user profile.\n */\n EDIT_PROFILE(\"1111\", \"EDIT_PROFILE\");\n\n private final String name;\n private final int mask;\n\n /**\n * Constructs the whole object without symbol.\n *\n * @param mask a bit mask that represents the permission, can be negative only for restrictions (look at the class\n * description). The integer representation of it is saved to the ACL tables of Spring Security.\n * @param name a textual representation of the permission (usually the same as the constant name), though the\n * restriction usually starts with the 'RESTRICTION_' word\n */\n ProfilePermission(int mask, @Nonnull String name){\n this.mask = mask;\n throwIfNameNotValid(name);\n this.name = name;\n }\n\n /**\n * Takes a string bit mask.\n *\n * @param mask a bit mask that represents the permission. It's parsed into integer and saved into the ACL tables of\n * Spring Security.\n * @param name a textual representation of the permission (usually the same as the constant name)\n * @throws NumberFormatException look at {@link Integer#parseInt(String, int)} for details on this as this method is\n * used underneath\n * @see BranchPermission#BranchPermission(int, String)\n * @see org.springframework.security.acls.domain.BasePermission\n */\n ProfilePermission(@Nonnull String mask, @Nonnull String name){\n throwIfNameNotValid(name);\n this.mask = Integer.parseInt(mask, 2);\n this.name = name;\n }\n\n /**\n * Gets the human readable textual representation of the restriction(usually the same as the constant name).\n *\n * @return the human readable textual representation of the restriction (usually the same as the constant name)\n */\n @Override\n public String getName() {\n return name;\n }\n\n private void throwIfNameNotValid(String name) {\n Assert.throwIfNull(name, \"The name can't be null\");\n }\n\n /**\n * {@inheritDoc}\n */\n @Override\n public int getMask() {\n return mask; //To change body of implemented methods use File | Settings | File Templates.\n }\n\n /**\n * {@inheritDoc}\n */\n @Override\n public String getPattern() {\n return null;\n }\n\n public static ProfilePermission findByMask(int mask) {\n for (ProfilePermission nextPermission : values()) {\n if (mask == nextPermission.getMask()) {\n return nextPermission;\n }\n }\n return null;\n }\n\n public static List getAllAsList(){\n return Lists.newArrayList(values());\n }\n}\n =================================================================== --- jtalks-common-model/src/main/java/org/jtalks/common/model/permissions/ProfilePermission.java (revision ) +++ jtalks-common-model/src/main/java/org/jtalks/common/model/permissions/ProfilePermission.java (revision 23f695f3e983e3f5a4e77cfda2ed09e25f4289e2) @@ -18,11 +18,7 @@ /** * The ability of user group or user to edit user profile. */ - EDIT_PROFILE("1111", "EDIT_PROFILE"), - /** - * The ability of user group or user to create static pages. - */ - CREATE_PAGES("10100", "CREATE_PAGES"); + EDIT_PROFILE("1111", "EDIT_PROFILE"); private final String name; private final int mask;