Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
getFilteredOption() : pass an optional userObject to be used as merge…
Browse files Browse the repository at this point in the history
…Role resolver
  • Loading branch information
cdujeu committed Jan 23, 2015
1 parent e0efb68 commit ef456c0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions core/src/core/classes/class.AJXP_Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,12 +135,15 @@ public function init($options)
$this->options = array_merge($this->loadOptionsDefaults(), $options);
}

protected function getFilteredOption($optionName, $repositoryScope = AJXP_REPO_SCOPE_ALL)
protected function getFilteredOption($optionName, $repositoryScope = AJXP_REPO_SCOPE_ALL, $userObject = null)
{
if(!is_array($this->options)) $this->options = array();
$merged = $this->options;
if(is_array($this->pluginConf)) $merged = array_merge($merged, $this->pluginConf);
$loggedUser = AuthService::getLoggedUser();
$loggedUser = $userObject;
if($loggedUser == null){
$loggedUser = AuthService::getLoggedUser();
}
if ($loggedUser != null) {
if ($repositoryScope == AJXP_REPO_SCOPE_ALL) {
$repo = ConfService::getRepository();
Expand Down

0 comments on commit ef456c0

Please sign in to comment.