예제 #1
0
 public function migrateDeprectated($repositoriesList, AjxpRole $oldRole)
 {
     $repositoriesList["ajxp.all"] = "";
     foreach ($repositoriesList as $repoId => $repoObject) {
         $right = $oldRole->getRight($repoId);
         if (!empty($right)) {
             $this->setAcl($repoId, $right);
         }
         $actions = $oldRole->getSpecificActionsRights($repoId);
         if (count($actions)) {
             foreach ($actions as $act => $status) {
                 if ($repoId == "ajxp.all") {
                     $this->setActionState(AJXP_PLUGINS_SCOPE_ALL, $act, AJXP_REPO_SCOPE_ALL, $status);
                 } else {
                     $this->setActionState(AJXP_PLUGINS_SCOPE_ALL, $act, $repoId, $status);
                 }
             }
         }
     }
     $this->setGroupPath($oldRole->getGroupPath());
     if ($oldRole->isDefault()) {
         $this->setAutoApplies(array("all"));
     }
 }