/** * Checks if the permissions of the current user on the single resource to use in the dialog are sufficient.<p> * * For a multi resource operation, this returns always true, checks only for single resource operations.<p> * * @see CmsDialog#checkResourcePermissions(CmsPermissionSet, boolean) * * @param required the required permissions for the dialog * @param neededForFolder if true, the permissions are required for the parent folder of the resource (e.g. for editors) * @return true if the permissions are sufficient, otherwise false */ @Override protected boolean checkResourcePermissions(CmsPermissionSet required, boolean neededForFolder) { if (isMultiOperation()) { // for multi resource operation, return always true return true; } else { // check for single resource operation return super.checkResourcePermissions(required, neededForFolder); } }
/** * Checks if the permissions of the current user on the single resource to use in the dialog are sufficient.<p> * * For a multi resource operation, this returns always true, checks only for single resource operations.<p> * * @see CmsDialog#checkResourcePermissions(CmsPermissionSet, boolean) * * @param required the required permissions for the dialog * @param neededForFolder if true, the permissions are required for the parent folder of the resource (e.g. for editors) * @return true if the permissions are sufficient, otherwise false */ @Override protected boolean checkResourcePermissions(CmsPermissionSet required, boolean neededForFolder) { if (isMultiOperation()) { // for multi resource operation, return always true return true; } else { // check for single resource operation return super.checkResourcePermissions(required, neededForFolder); } }
/** * Checks if the permissions of the current user on the resource to use in the dialog are sufficient.<p> * * Automatically generates a CmsMessageContainer object with an error message and stores it in the users session.<p> * * @param required the required permissions for the dialog * @param neededForFolder if true, the permissions are required for the parent folder of the resource (e.g. for editors) * * @return true if the permissions are sufficient, otherwise false */ protected boolean checkResourcePermissions(CmsPermissionSet required, boolean neededForFolder) { return checkResourcePermissions(required, neededForFolder, Messages.get().container( Messages.GUI_ERR_RESOURCE_PERMISSIONS_2, getParamResource(), required.getPermissionString())); }
/** * Checks if the permissions of the current user on the resource to use in the dialog are sufficient.<p> * * Automatically generates a CmsMessageContainer object with an error message and stores it in the users session.<p> * * @param required the required permissions for the dialog * @param neededForFolder if true, the permissions are required for the parent folder of the resource (e.g. for editors) * * @return true if the permissions are sufficient, otherwise false */ protected boolean checkResourcePermissions(CmsPermissionSet required, boolean neededForFolder) { return checkResourcePermissions( required, neededForFolder, Messages.get().container( Messages.GUI_ERR_RESOURCE_PERMISSIONS_2, getParamResource(), required.getPermissionString())); }