net.myvietnam.mvnplugin.mvnforum.auth
Interface MVNForumPermission

All Known Implementing Classes:
AbstractPermission

public interface MVNForumPermission


Field Summary
static int PERMISSION_AUTHENTICATED
          All users will have this permission once they have logged in.
static int PERMISSION_CATEGORY_ADMIN
          Reserved
static int PERMISSION_CATEGORY_MODERATOR
          Reserved
static int PERMISSION_DELETE_CATEGORY
          Delete a Category
static int PERMISSION_DELETE_FORUM
          Delete a Forum
static int PERMISSION_DELETE_POLL
          Create a new poll
static int PERMISSION_DELETE_POST
          Delete post in the forum
static int PERMISSION_EDIT_CATEGORY
          Edit a Category
static int PERMISSION_EDIT_FORUM
          Edit a Forum
static int PERMISSION_EDIT_POLL
          Create a new poll
static int PERMISSION_EDIT_POST
          Edit post in the forum
static int PERMISSION_EMPTY
          No permission, just use to reserved the value 0 Normally, this permission should never be used.
static int PERMISSION_FORUM_ADMIN
           
static int PERMISSION_FORUM_MODERATOR
           
static int PERMISSION_GET_ATTACHMENT
          Can download attached files
static int PERMISSION_GROUP_ADMIN
           
static int PERMISSION_GROUP_MODERATOR
           
static int PERMISSION_LIMITED_USER
          Can: - login, read thread and post, reply to a thread
static int PERMISSION_LOGIN
          Login
static int PERMISSION_NEW_CATEGORY
          New a Category
static int PERMISSION_NEW_FORUM
          New a Forum
static int PERMISSION_NEW_POLL
          Create a new poll
static int PERMISSION_NEW_POST
          Create a new post (reply to a thread)
static int PERMISSION_NEW_THREAD
          Create new thread
static int PERMISSION_NO_PERMISSIONS
          If a user have this permission, it means he is revoked all permissions This permission is still reserved for future uses.
static int PERMISSION_NORMAL_USER
          Can: - login, read thread and post, reply to a thread - new thread, use avatar, get attachment
static int PERMISSION_POWER_USER
          Can: - login, read thread and post, reply to a thread - new thread, use avatar, get attachment - use attachment, create poll
static int PERMISSION_READ_POST
          Read post in the forum
static int PERMISSION_SEND_MAIL
          Delete a Category
static int PERMISSION_SYSTEM_ADMIN
          This permission is combination of all permissions, but excludes all special permissions.
static int PERMISSION_USE_ATTACHMENT
          Can attach files when posting
static int PERMISSION_USE_AVATAR
          Use private message
static int PERMISSION_USE_MESSAGE
          Use private message
static int PERMISSION_USER_ADMIN
           
static int PERMISSION_USER_MODERATOR
           
 
Method Summary
 boolean canAdminSystem()
           
 boolean canDeleteCategory()
           
 boolean canDeleteForum()
           
 boolean canDeletePoll(int forumID)
           
 boolean canDeletePost(int forumID)
           
 boolean canEditCategory()
           
 boolean canEditForum()
           
 boolean canEditPoll(int forumID)
           
 boolean canEditPost(int forumID)
           
 boolean canGetAttachment(int forumID)
           
 boolean canLogin()
          The below methods are used to check global permissions
 boolean canNewCategory()
           
 boolean canNewForum()
           
 boolean canNewPoll(int forumID)
           
 boolean canNewPost(int forumID)
           
 boolean canNewThread(int forumID)
           
 boolean canReadPost(int forumID)
          The below methods are used to check individual forum permissions
 boolean canSendMail()
           
 boolean canUseAttachment(int forumID)
           
 boolean canUseAvatar()
           
 boolean canUseMessage()
           
 void ensureCanAdminSystem()
           
 void ensureCanDeleteCategory()
           
 void ensureCanDeleteForum()
           
 void ensureCanDeletePoll(int forumID)
           
 void ensureCanDeletePost(int forumID)
           
 void ensureCanEditCategory()
           
 void ensureCanEditForum()
           
 void ensureCanEditPoll(int forumID)
           
 void ensureCanEditPost(int forumID)
           
 void ensureCanGetAttachment(int forumID)
           
 void ensureCanLogin()
           
 void ensureCanNewCategory()
           
 void ensureCanNewForum()
           
 void ensureCanNewPoll(int forumID)
           
 void ensureCanNewPost(int forumID)
           
 void ensureCanNewThread(int forumID)
           
 void ensureCanReadPost(int forumID)
           
 void ensureCanSendMail()
           
 void ensureCanUseAttachment(int forumID)
           
 void ensureCanUseAvatar()
           
 void ensureCanUseMessage()
           
 void ensureIsAuthenticated()
           
 boolean isAuthenticated()
          Special permissions methods
 

Field Detail

PERMISSION_EMPTY

public static final int PERMISSION_EMPTY
No permission, just use to reserved the value 0 Normally, this permission should never be used.

See Also:
Constant Field Values

PERMISSION_AUTHENTICATED

public static final int PERMISSION_AUTHENTICATED
All users will have this permission once they have logged in.

See Also:
Constant Field Values

PERMISSION_NO_PERMISSIONS

public static final int PERMISSION_NO_PERMISSIONS
If a user have this permission, it means he is revoked all permissions This permission is still reserved for future uses.

See Also:
Constant Field Values

PERMISSION_SYSTEM_ADMIN

public static final int PERMISSION_SYSTEM_ADMIN
This permission is combination of all permissions, but excludes all special permissions.

See Also:
Constant Field Values

PERMISSION_GROUP_ADMIN

public static final int PERMISSION_GROUP_ADMIN
See Also:
Constant Field Values

PERMISSION_GROUP_MODERATOR

public static final int PERMISSION_GROUP_MODERATOR
See Also:
Constant Field Values

PERMISSION_USER_ADMIN

public static final int PERMISSION_USER_ADMIN
See Also:
Constant Field Values

PERMISSION_USER_MODERATOR

public static final int PERMISSION_USER_MODERATOR
See Also:
Constant Field Values

PERMISSION_FORUM_ADMIN

public static final int PERMISSION_FORUM_ADMIN
See Also:
Constant Field Values

PERMISSION_FORUM_MODERATOR

public static final int PERMISSION_FORUM_MODERATOR
See Also:
Constant Field Values

PERMISSION_CATEGORY_ADMIN

public static final int PERMISSION_CATEGORY_ADMIN
Reserved

See Also:
Constant Field Values

PERMISSION_CATEGORY_MODERATOR

public static final int PERMISSION_CATEGORY_MODERATOR
Reserved

See Also:
Constant Field Values

PERMISSION_LIMITED_USER

public static final int PERMISSION_LIMITED_USER
Can: - login, read thread and post, reply to a thread

See Also:
Constant Field Values

PERMISSION_NORMAL_USER

public static final int PERMISSION_NORMAL_USER
Can: - login, read thread and post, reply to a thread - new thread, use avatar, get attachment

See Also:
Constant Field Values

PERMISSION_POWER_USER

public static final int PERMISSION_POWER_USER
Can: - login, read thread and post, reply to a thread - new thread, use avatar, get attachment - use attachment, create poll

See Also:
Constant Field Values

PERMISSION_LOGIN

public static final int PERMISSION_LOGIN
Login

See Also:
Constant Field Values

PERMISSION_NEW_FORUM

public static final int PERMISSION_NEW_FORUM
New a Forum

See Also:
Constant Field Values

PERMISSION_EDIT_FORUM

public static final int PERMISSION_EDIT_FORUM
Edit a Forum

See Also:
Constant Field Values

PERMISSION_DELETE_FORUM

public static final int PERMISSION_DELETE_FORUM
Delete a Forum

See Also:
Constant Field Values

PERMISSION_NEW_CATEGORY

public static final int PERMISSION_NEW_CATEGORY
New a Category

See Also:
Constant Field Values

PERMISSION_EDIT_CATEGORY

public static final int PERMISSION_EDIT_CATEGORY
Edit a Category

See Also:
Constant Field Values

PERMISSION_DELETE_CATEGORY

public static final int PERMISSION_DELETE_CATEGORY
Delete a Category

See Also:
Constant Field Values

PERMISSION_SEND_MAIL

public static final int PERMISSION_SEND_MAIL
Delete a Category

See Also:
Constant Field Values

PERMISSION_USE_MESSAGE

public static final int PERMISSION_USE_MESSAGE
Use private message

See Also:
Constant Field Values

PERMISSION_USE_AVATAR

public static final int PERMISSION_USE_AVATAR
Use private message

See Also:
Constant Field Values

PERMISSION_READ_POST

public static final int PERMISSION_READ_POST
Read post in the forum

See Also:
Constant Field Values

PERMISSION_NEW_THREAD

public static final int PERMISSION_NEW_THREAD
Create new thread

See Also:
Constant Field Values

PERMISSION_NEW_POST

public static final int PERMISSION_NEW_POST
Create a new post (reply to a thread)

See Also:
Constant Field Values

PERMISSION_EDIT_POST

public static final int PERMISSION_EDIT_POST
Edit post in the forum

See Also:
Constant Field Values

PERMISSION_DELETE_POST

public static final int PERMISSION_DELETE_POST
Delete post in the forum

See Also:
Constant Field Values

PERMISSION_NEW_POLL

public static final int PERMISSION_NEW_POLL
Create a new poll

See Also:
Constant Field Values

PERMISSION_EDIT_POLL

public static final int PERMISSION_EDIT_POLL
Create a new poll

See Also:
Constant Field Values

PERMISSION_DELETE_POLL

public static final int PERMISSION_DELETE_POLL
Create a new poll

See Also:
Constant Field Values

PERMISSION_USE_ATTACHMENT

public static final int PERMISSION_USE_ATTACHMENT
Can attach files when posting

See Also:
Constant Field Values

PERMISSION_GET_ATTACHMENT

public static final int PERMISSION_GET_ATTACHMENT
Can download attached files

See Also:
Constant Field Values
Method Detail

isAuthenticated

public boolean isAuthenticated()
Special permissions methods


ensureIsAuthenticated

public void ensureIsAuthenticated()
                           throws AuthenticationException
AuthenticationException

canLogin

public boolean canLogin()
The below methods are used to check global permissions


ensureCanLogin

public void ensureCanLogin()
                    throws AuthenticationException
AuthenticationException

canAdminSystem

public boolean canAdminSystem()

ensureCanAdminSystem

public void ensureCanAdminSystem()
                          throws AuthenticationException
AuthenticationException

canNewForum

public boolean canNewForum()

ensureCanNewForum

public void ensureCanNewForum()
                       throws AuthenticationException
AuthenticationException

canEditForum

public boolean canEditForum()

ensureCanEditForum

public void ensureCanEditForum()
                        throws AuthenticationException
AuthenticationException

canDeleteForum

public boolean canDeleteForum()

ensureCanDeleteForum

public void ensureCanDeleteForum()
                          throws AuthenticationException
AuthenticationException

canNewCategory

public boolean canNewCategory()

ensureCanNewCategory

public void ensureCanNewCategory()
                          throws AuthenticationException
AuthenticationException

canEditCategory

public boolean canEditCategory()

ensureCanEditCategory

public void ensureCanEditCategory()
                           throws AuthenticationException
AuthenticationException

canDeleteCategory

public boolean canDeleteCategory()

ensureCanDeleteCategory

public void ensureCanDeleteCategory()
                             throws AuthenticationException
AuthenticationException

canSendMail

public boolean canSendMail()

ensureCanSendMail

public void ensureCanSendMail()
                       throws AuthenticationException
AuthenticationException

canUseAvatar

public boolean canUseAvatar()

ensureCanUseAvatar

public void ensureCanUseAvatar()
                        throws AuthenticationException
AuthenticationException

canUseMessage

public boolean canUseMessage()

ensureCanUseMessage

public void ensureCanUseMessage()
                         throws AuthenticationException
AuthenticationException

canReadPost

public boolean canReadPost(int forumID)
The below methods are used to check individual forum permissions


ensureCanReadPost

public void ensureCanReadPost(int forumID)
                       throws AuthenticationException
AuthenticationException

canNewThread

public boolean canNewThread(int forumID)

ensureCanNewThread

public void ensureCanNewThread(int forumID)
                        throws AuthenticationException
AuthenticationException

canNewPost

public boolean canNewPost(int forumID)

ensureCanNewPost

public void ensureCanNewPost(int forumID)
                      throws AuthenticationException
AuthenticationException

canEditPost

public boolean canEditPost(int forumID)

ensureCanEditPost

public void ensureCanEditPost(int forumID)
                       throws AuthenticationException
AuthenticationException

canDeletePost

public boolean canDeletePost(int forumID)

ensureCanDeletePost

public void ensureCanDeletePost(int forumID)
                         throws AuthenticationException
AuthenticationException

canNewPoll

public boolean canNewPoll(int forumID)

ensureCanNewPoll

public void ensureCanNewPoll(int forumID)
                      throws AuthenticationException
AuthenticationException

canEditPoll

public boolean canEditPoll(int forumID)

ensureCanEditPoll

public void ensureCanEditPoll(int forumID)
                       throws AuthenticationException
AuthenticationException

canDeletePoll

public boolean canDeletePoll(int forumID)

ensureCanDeletePoll

public void ensureCanDeletePoll(int forumID)
                         throws AuthenticationException
AuthenticationException

canUseAttachment

public boolean canUseAttachment(int forumID)

ensureCanUseAttachment

public void ensureCanUseAttachment(int forumID)
                            throws AuthenticationException
AuthenticationException

canGetAttachment

public boolean canGetAttachment(int forumID)

ensureCanGetAttachment

public void ensureCanGetAttachment(int forumID)
                            throws AuthenticationException
AuthenticationException