org.blojsom.plugin.permission
Class PermissionChecker

java.lang.Object
  extended byorg.blojsom.plugin.permission.PermissionChecker

public class PermissionChecker
extends java.lang.Object

Permission Checker plugin

Since:
blojsom 2.28
Version:
$Id: $
Author:
David Czarnecki

Constructor Summary
PermissionChecker(BlogUser blogUser, AuthorizationProvider authorizationProvider, java.util.Map permissionContext)
          Create a new permission checker for a given blog
 
Method Summary
 boolean checkPermission(java.lang.String username, java.lang.String permission)
          Check permission for a given username and permission
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PermissionChecker

public PermissionChecker(BlogUser blogUser,
                         AuthorizationProvider authorizationProvider,
                         java.util.Map permissionContext)
Create a new permission checker for a given blog

Parameters:
blogUser - BlogUser
authorizationProvider - AuthorizationProvider
permissionContext - Context for permissions to be evaulated in (not-used)
Method Detail

checkPermission

public boolean checkPermission(java.lang.String username,
                               java.lang.String permission)
Check permission for a given username and permission

Parameters:
username - Username
permission - Permission to check
Returns:
true if username has given permission, false otherwise