groupname change by django

This commit is contained in:
holger.trampe 2021-07-27 00:05:26 +02:00
parent 252b357eb7
commit 21d31c67ff
3 changed files with 11 additions and 1 deletions

View File

@ -17,5 +17,6 @@ return [
# DEVELOPMENT # DEVELOPMENT
['name' => 'migrate#startMigration', 'url' => '/startmigration', 'verb' => 'PUT'], ['name' => 'migrate#startMigration', 'url' => '/startmigration', 'verb' => 'PUT'],
['name' => 'migrate#getcurrentuser', 'url' => '/getcurrentuser', 'verb' => 'POST'], ['name' => 'migrate#getcurrentuser', 'url' => '/getcurrentuser', 'verb' => 'POST'],
['name' => 'migrate#renameGroup', 'url' => '/regr', 'verb' => 'POST'],
] ]
]; ];

View File

@ -52,7 +52,6 @@ class UserChangedByNC extends Controller {
] ]
]; ];
$context = stream_context_create($opts); $context = stream_context_create($opts);
#$file = file_get_contents($this->nclink.'/api/uschanged/'.$this->session->getUser()->getUID(), false, $context);
$file = file_get_contents($this->nclink.'/api/uschanged/'.$this->session->getUser()->getUID().'/'.$this->request->getCookie('nc_session_id'), false, $context); $file = file_get_contents($this->nclink.'/api/uschanged/'.$this->session->getUser()->getUID().'/'.$this->request->getCookie('nc_session_id'), false, $context);
} }

View File

@ -78,4 +78,14 @@ class MigrateController extends Controller {
#return $this->userSession->getUser()->getUID(); #return $this->userSession->getUser()->getUID();
return $this->userSession->getSession(); return $this->userSession->getSession();
} }
/**
* Method change the GroupName - ADMIN NEED!
*
* @PublicPage
* @NoCSRFRequired
*/
public function renameGroup(string $id, string $name){
$this->groupManager->get($id)->setDisplayName($name);
return 'OK!';
}
} }