Skip to content

Commit f13b52b

Browse files
AdrienClairembaultbtry
authored andcommitted
Rebase and rights checks
1 parent 7a12167 commit f13b52b

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

inc/category.class.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@
3535

3636
class PluginFormcreatorCategory extends CommonTreeDropdown
3737
{
38-
static function canView() {
39-
return Session::haveRight('ticket', CREATE);
40-
}
41-
4238
// Activate translation on GLPI 0.85
4339
var $can_be_translated = true;
4440

41+
static function canView() {
42+
return parent::canView() || $_SESSION['glpiactiveprofile']['interface'] == 'helpdesk';
43+
}
44+
4545
public static function getTypeName($nb = 1) {
4646
return _n('Form category', 'Form categories', $nb, 'formcreator');
4747
}

inc/form.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public static function canCreate() {
5656
}
5757

5858
public static function canView() {
59-
return Session::haveRight('ticket', CREATE);
59+
return Session::haveRight('entity', UPDATE) || $_SESSION['glpiactiveprofile']['interface'] == 'helpdesk';
6060
}
6161

6262
public static function canDelete() {

0 commit comments

Comments
 (0)