Example usage for com.liferay.portal.kernel.security.permission ActionKeys ADD_DISCUSSION

List of usage examples for com.liferay.portal.kernel.security.permission ActionKeys ADD_DISCUSSION

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.security.permission ActionKeys ADD_DISCUSSION.

Prototype

String ADD_DISCUSSION

To view the source code for com.liferay.portal.kernel.security.permission ActionKeys ADD_DISCUSSION.

Click Source Link

Usage

From source file:com.liferay.blogs.service.test.BlogsEntryLocalServiceTest.java

License:Open Source License

@Test
public void testUpdateEntryResources() throws Exception {
    BlogsEntry entry = addEntry(false);/*w w  w  .  ja  v a2  s . c o m*/

    BlogsEntryLocalServiceUtil.updateEntryResources(entry, new String[] { ActionKeys.ADD_DISCUSSION }, null);
}

From source file:com.liferay.message.boards.comment.internal.MBDiscussionPermissionImpl.java

License:Open Source License

@Override
public boolean hasAddPermission(long companyId, long groupId, String className, long classPK) {

    return MBDiscussionPermission.contains(_permissionChecker, companyId, groupId, className, classPK,
            ActionKeys.ADD_DISCUSSION);
}

From source file:com.liferay.message.boards.internal.service.MBDiscussionMBMessageServiceWrapper.java

License:Open Source License

@Override
public MBMessage addDiscussionMessage(long groupId, String className, long classPK, long threadId,
        long parentMessageId, String subject, String body, ServiceContext serviceContext)
        throws PortalException {

    User user = _getGuestOrUser();/*  w w w  .j  a va 2  s. com*/

    MBDiscussionPermission.check(_getPermissionChecker(), user.getCompanyId(), serviceContext.getScopeGroupId(),
            className, classPK, ActionKeys.ADD_DISCUSSION);

    return super.addDiscussionMessage(groupId, className, classPK, threadId, parentMessageId, subject, body,
            serviceContext);
}