List of usage examples for com.liferay.portal.kernel.security.permission ActionKeys DELETE
String DELETE
To view the source code for com.liferay.portal.kernel.security.permission ActionKeys DELETE.
Click Source Link
From source file:com.liferay.expando.web.internal.search.CustomFieldChecker.java
License:Open Source License
@Override public boolean isDisabled(Object obj) { ExpandoColumn expandoColumn = ExpandoColumnLocalServiceUtil.getDefaultTableColumn(_companyId, _modelResource, (String) obj); PermissionChecker permissionChecker = PermissionThreadLocal.getPermissionChecker(); if (!ExpandoColumnPermissionUtil.contains(permissionChecker, expandoColumn, ActionKeys.DELETE)) { return true; }//from w w w . ja v a2s . c om return super.isDisabled(obj); }
From source file:com.liferay.exportimport.internal.staging.permission.StagingPermissionImpl.java
License:Open Source License
protected Boolean doHasPermission(PermissionChecker permissionChecker, Group group, String className, long classPK, String portletId, String actionId) throws Exception { if (!PropsValues.STAGING_LIVE_GROUP_LOCKING_ENABLED) { return null; }/*from ww w .j a v a 2s . c o m*/ if (!actionId.equals(ActionKeys.ACCESS) && !actionId.equals(ActionKeys.ACCESS_IN_CONTROL_PANEL) && !actionId.equals(ActionKeys.ADD_TO_PAGE) && !actionId.equals(ActionKeys.ASSIGN_MEMBERS) && !actionId.equals(ActionKeys.CONFIGURATION) && !actionId.equals(ActionKeys.CUSTOMIZE) && !actionId.equals(ActionKeys.DELETE) && !actionId.equals(ActionKeys.VIEW) && group.hasLocalOrRemoteStagingGroup() && (Validator.isNull(portletId) || group.isStagedPortlet(portletId))) { return false; } else { return null; } }
From source file:com.liferay.journal.service.impl.JournalArticleServiceImpl.java
License:Open Source License
/** * Deletes the web content article and its resources matching the group, * article ID, and version, optionally sending email notifying denial of the * web content article if it had not yet been approved. * * @param groupId the primary key of the web content article's group * @param articleId the primary key of the web content article * @param version the web content article's version * @param articleURL the web content article's accessible URL * @param serviceContext the service context to be applied. Can set the * portlet preferences that include email information to notify * recipients of the unapproved web content article's denial. *///w w w. j a v a2 s .c o m @Override public void deleteArticle(long groupId, String articleId, double version, String articleURL, ServiceContext serviceContext) throws PortalException { JournalArticlePermission.check(getPermissionChecker(), groupId, articleId, version, ActionKeys.DELETE); journalArticleLocalService.deleteArticle(groupId, articleId, version, articleURL, serviceContext); }
From source file:com.liferay.journal.service.impl.JournalArticleServiceImpl.java
License:Open Source License
/** * Deletes all web content articles and their resources matching the group * and article ID, optionally sending email notifying denial of article if * it had not yet been approved./*w ww . j ava2 s. c om*/ * * @param groupId the primary key of the web content article's group * @param articleId the primary key of the web content article * @param articleURL the web content article's accessible URL * @param serviceContext the service context to be applied. Can set the * portlet preferences that include email information to notify * recipients of the unapproved web content article's denial. */ @Override public void deleteArticle(long groupId, String articleId, String articleURL, ServiceContext serviceContext) throws PortalException { JournalArticlePermission.check(getPermissionChecker(), groupId, articleId, ActionKeys.DELETE); journalArticleLocalService.deleteArticle(groupId, articleId, serviceContext); }
From source file:com.liferay.journal.service.impl.JournalArticleServiceImpl.java
License:Open Source License
/** * Moves the latest version of the web content article matching the group * and article ID to the recycle bin.// w ww . java 2 s. c o m * * @param groupId the primary key of the web content article's group * @param articleId the primary key of the web content article * @return the moved web content article or <code>null</code> if no matching * article was found */ @Override public JournalArticle moveArticleToTrash(long groupId, String articleId) throws PortalException { JournalArticlePermission.check(getPermissionChecker(), groupId, articleId, ActionKeys.DELETE); return journalArticleLocalService.moveArticleToTrash(getUserId(), groupId, articleId); }
From source file:com.liferay.journal.service.impl.JournalArticleServiceImpl.java
License:Open Source License
/** * Restores the web content article associated with the resource primary key * from the Recycle Bin.//w ww . j av a 2 s .c o m * * @param resourcePrimKey the primary key of the resource instance */ @Override public void restoreArticleFromTrash(long resourcePrimKey) throws PortalException { JournalArticle article = getLatestArticle(resourcePrimKey); JournalArticlePermission.check(getPermissionChecker(), article, ActionKeys.DELETE); journalArticleLocalService.restoreArticleFromTrash(getUserId(), article); }
From source file:com.liferay.journal.service.impl.JournalFeedServiceImpl.java
License:Open Source License
@Override public void deleteFeed(long feedId) throws PortalException { JournalFeedPermission.check(getPermissionChecker(), feedId, ActionKeys.DELETE); journalFeedLocalService.deleteFeed(feedId); }
From source file:com.liferay.journal.service.impl.JournalFeedServiceImpl.java
License:Open Source License
@Override public void deleteFeed(long groupId, String feedId) throws PortalException { JournalFeedPermission.check(getPermissionChecker(), groupId, feedId, ActionKeys.DELETE); journalFeedLocalService.deleteFeed(groupId, feedId); }
From source file:com.liferay.journal.service.impl.JournalFolderServiceImpl.java
License:Open Source License
@Override public void deleteFolder(long folderId) throws PortalException { JournalFolder folder = journalFolderLocalService.getFolder(folderId); JournalFolderPermission.check(getPermissionChecker(), folder, ActionKeys.DELETE); journalFolderLocalService.deleteFolder(folderId); }
From source file:com.liferay.journal.service.impl.JournalFolderServiceImpl.java
License:Open Source License
@Override public void deleteFolder(long folderId, boolean includeTrashedEntries) throws PortalException { JournalFolder folder = journalFolderLocalService.getFolder(folderId); JournalFolderPermission.check(getPermissionChecker(), folder, ActionKeys.DELETE); journalFolderLocalService.deleteFolder(folderId, includeTrashedEntries); }