◆ check()
static check |
( |
|
$perm, |
|
|
|
$seminar_id, |
|
|
|
$topic_id = null |
|
) |
| |
|
static |
If the user has not the passed perm in a seminar, an AccessDeniedException is thrown. An optional topic_id can be passed which is checked against the passed seminar if the topic_id belongs to that seminar
- Parameters
-
string | $perm | for the list of possible perms and their function see ::hasPerm() |
string | $seminar_id | the seminar to check for |
string | $topic_id | if passed, this topic_id is checked if it belongs to the passed seminar |
- Exceptions
-
◆ checkCategoryId()
static checkCategoryId |
( |
|
$seminar_id, |
|
|
|
$category_id |
|
) |
| |
|
static |
check if the passed category_id belongs to the passed seminar_id. Throws an AccessDenied denied exception if this is not the case
- Parameters
-
string | $seminar_id | id of the seminar, the category should belong to |
string | $category_id | the id of the category to check |
◆ checkTopicId()
static checkTopicId |
( |
|
$seminar_id, |
|
|
|
$topic_id |
|
) |
| |
|
static |
check if the passed topic_id belongs to the passed seminar_id. Throws an AccessDenied denied exception if this is not the case
- Parameters
-
string | $seminar_id | id of the seminar, the category should belong to |
string | $topic_id | the id of the topic to check |
◆ has()
static has |
( |
|
$perm, |
|
|
|
$seminar_id, |
|
|
|
$user_id = null |
|
) |
| |
|
static |
Check, if the a user has the passed permission in a seminar. Possible permissions are: edit_category - Editing the name of a category
add_category - Adding a new category
remove_category - Removing an existing category
sort_category - Sorting categories
edit_area - Editing an area (title + content)
add_area - Adding a new area
remove_area - Removing an area and all belonging threads
sort_area - Sorting of areas in categories and between categories
search - Searching in postings
edit_entry - Editing of foreign threads/postings
add_entry - Creating a new thread/posting
remove_entry - Removing of foreign threads/postings
fav_entry - Marking a Posting as "favorite"
like_entry - Liking a posting
move_thread - Moving a thrad between ares
close_thread - Close or open a thread
make_sticky - Make a thread sticky
abo - Signing up for mail-notifications for new entries
forward_entry - Forwarding an existing entry as a message
pdfexport - Exporting parts of the forum as PDF
admin - Allowed to mass-administrate the forum
view - Allowed to view the forum at all
edit_closed - Editing entries in a closed thread
- Parameters
-
string | $perm | one of the modular permissions |
string | $seminar_id | the seminar to check for |
string | $user_id | the user to check for |
- Returns
- boolean true, if the user has the perms, false otherwise
◆ hasEditPerms()
static hasEditPerms |
( |
|
$topic_id | ) |
|
|
static |
Check if the current user is allowed to edit the topic denoted by the passed id
array $perms
- Parameters
-
string | $topic_id | the id for the topic to check for |
- Returns
- bool true if the user has the necessary perms, false otherwise
The documentation for this class was generated from the following file: