-
Notifications
You must be signed in to change notification settings - Fork 174
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Cand. Params] Users with cand param edit permission should be able …
…to view module (#5373) Previously only users with candidate_parameter_view could view the module. This allows users with candidate_parameter_edit to view it also.
- Loading branch information
1 parent
4f0ef14
commit 4177841
Showing
3 changed files
with
19 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,32 @@ | ||
<?php | ||
/** | ||
* This file contains the NDB_Menu_Filter_media class | ||
* This file contains the Quality_Control class | ||
* | ||
* PHP Version 7 | ||
* | ||
* @category Module | ||
* @package Quality_Control | ||
* @author Liza Levitis <[email protected]> | ||
* @license http://www.gnu.org/licenses/gpl-3.0.txt GPLv3 | ||
* @link https://www.github.com/aces/CCNA/ | ||
* @link https://www.github.com/aces/Loris | ||
*/ | ||
namespace LORIS\quality_control; | ||
|
||
/** | ||
* Main class for quality control module corresponding to /quality_control/ URL | ||
* Tools section of the LorisMenu. | ||
* Main class for quality control module corresponding to /quality_control/ | ||
* endpoint. | ||
* | ||
* PHP Version 7 | ||
* | ||
* @category Module | ||
* @package Quality_Control | ||
* @author Liza Levitis <[email protected]> | ||
* @license http://www.gnu.org/licenses/gpl-3.0.txt GPLv3 | ||
* @link https://www.github.com/aces/CCNA/ | ||
* @link https://www.github.com/aces/Loris | ||
*/ | ||
class Quality_Control extends \NDB_Menu_Filter | ||
{ | ||
public $hasWritePermission = false; | ||
public $AjaxModule = true; | ||
public $hasHidePermission = false; | ||
public $AjaxModule = true; | ||
public $fieldOptions; | ||
|
||
/** | ||
|
@@ -41,8 +39,7 @@ class Quality_Control extends \NDB_Menu_Filter | |
*/ | ||
function _hasAccess(\User $user) : bool | ||
{ | ||
//create user object | ||
$this->hasHidePermission = $user->hasPermission("superuser"); | ||
// FIXME This module should have its own permission. | ||
return $user->hasPermission('data_team_helper'); | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,31 @@ | ||
<?php | ||
/** | ||
* This file contains the NDB_Menu_Filter_media class | ||
* This file contains the Quality_Control_Behavioral class. | ||
* | ||
* PHP Version 7 | ||
* | ||
* @category Module | ||
* @package Quality_Control | ||
* @author Liza Levitis <[email protected]> | ||
* @license http://www.gnu.org/licenses/gpl-3.0.txt GPLv3 | ||
* @link https://www.github.com/aces/CCNA/ | ||
* @link https://www.github.com/aces/Loris | ||
*/ | ||
namespace LORIS\quality_control; | ||
|
||
/** | ||
* Main class for quality control module corresponding to /quality_control/ URL | ||
* Tools section of the LorisMenu. | ||
* Quality_Control_Behavioral class. | ||
* | ||
* PHP Version 7 | ||
* | ||
* @category Module | ||
* @package Quality_Control | ||
* @author Liza Levitis <[email protected]> | ||
* @license http://www.gnu.org/licenses/gpl-3.0.txt GPLv3 | ||
* @link https://www.github.com/aces/CCNA/ | ||
* @link https://www.github.com/aces/Loris | ||
*/ | ||
class Quality_Control_Behavioral extends \NDB_Menu_Filter | ||
{ | ||
public $hasWritePermission = false; | ||
public $AjaxModule = true; | ||
public $AjaxModule = true; | ||
public $fieldOptions; | ||
|
||
/** | ||
|
@@ -40,7 +38,7 @@ class Quality_Control_Behavioral extends \NDB_Menu_Filter | |
*/ | ||
function _hasAccess(\User $user) : bool | ||
{ | ||
//create user object | ||
// FIXME This module should have its own permission | ||
return $user->hasPermission('data_team_helper'); | ||
} | ||
|
||
|