本文整理汇总了Java中com.atlassian.confluence.security.SpacePermission类的典型用法代码示例。如果您正苦于以下问题:Java SpacePermission类的具体用法?Java SpacePermission怎么用?Java SpacePermission使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
SpacePermission类属于com.atlassian.confluence.security包,在下文中一共展示了SpacePermission类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: checkPermissions
import com.atlassian.confluence.security.SpacePermission; //导入依赖的package包/类
private void checkPermissions(Space space, String token) throws InvalidSessionException, NotPermittedException
{
User user = getUser(token);
List<String> permTypes = new ArrayList<String>();
permTypes.add(SpacePermission.VIEWSPACE_PERMISSION);
if(!gpUtil.getSpacePermissionManager().hasPermissionForSpace(user, permTypes, space))
{
throw new NotPermittedException();
}
}
示例2: checkPermissions
import com.atlassian.confluence.security.SpacePermission; //导入依赖的package包/类
private void checkPermissions(Space space, ConfluenceUser user) throws NotPermittedException {
List<String> permTypes = new ArrayList<>();
permTypes.add(SpacePermission.VIEWSPACE_PERMISSION);
if (!ldUtil.getSpacePermissionManager().hasPermissionForSpace(user, permTypes, space)) {
throw new NotPermittedException();
}
}
示例3: canEdit
import com.atlassian.confluence.security.SpacePermission; //导入依赖的package包/类
public boolean canEdit(Page page)
{
List<String> permTypes = new ArrayList<String>();
permTypes.add(SpacePermission.CREATEEDIT_PAGE_PERMISSION);
return getSpacePermissionManager().hasPermissionForSpace(getRemoteUser(), permTypes, page.getSpace());
}
示例4: canView
import com.atlassian.confluence.security.SpacePermission; //导入依赖的package包/类
public boolean canView(Space space)
{
List<String> permTypes = new ArrayList<String>();
permTypes.add(SpacePermission.VIEWSPACE_PERMISSION);
return getSpacePermissionManager().hasPermissionForSpace(getRemoteUser(), permTypes, space);
}
示例5: canEdit
import com.atlassian.confluence.security.SpacePermission; //导入依赖的package包/类
public boolean canEdit(Page page) {
List<String> permTypes = new ArrayList<String>();
permTypes.add(SpacePermission.CREATEEDIT_PAGE_PERMISSION);
return getSpacePermissionManager().hasPermissionForSpace(getRemoteUser(), permTypes, page.getSpace());
}
示例6: canView
import com.atlassian.confluence.security.SpacePermission; //导入依赖的package包/类
public boolean canView(Space space) {
List<String> permTypes = new ArrayList<String>();
permTypes.add(SpacePermission.VIEWSPACE_PERMISSION);
return getSpacePermissionManager().hasPermissionForSpace(getRemoteUser(), permTypes, space);
}
示例7: canEdit
import com.atlassian.confluence.security.SpacePermission; //导入依赖的package包/类
/**
* <p>canEdit.</p>
*
* @param page a {@link com.atlassian.confluence.pages.Page} object.
* @return a boolean.
*/
public boolean canEdit(Page page) {
List<String> permTypes = new ArrayList<String>();
permTypes.add(SpacePermission.CREATEEDIT_PAGE_PERMISSION);
return getSpacePermissionManager().hasPermissionForSpace(getRemoteUser(), permTypes, page.getSpace());
}
示例8: canView
import com.atlassian.confluence.security.SpacePermission; //导入依赖的package包/类
/**
* <p>canView.</p>
*
* @param space a {@link com.atlassian.confluence.spaces.Space} object.
* @return a boolean.
*/
public boolean canView(Space space) {
List<String> permTypes = new ArrayList<String>();
permTypes.add(SpacePermission.VIEWSPACE_PERMISSION);
return getSpacePermissionManager().hasPermissionForSpace(getRemoteUser(), permTypes, space);
}