links angepasst

This commit is contained in:
holger.trampe 2021-07-31 11:07:19 +02:00
parent c441fbda4b
commit aa1aaab607
6 changed files with 17 additions and 11 deletions

View File

@ -1,7 +1,7 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<info xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" <info xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://apps.nextcloud.com/schema/apps/info.xsd"> xsi:noNamespaceSchemaLocation="https://apps.nextcloud.com/schema/apps/info.xsd">
<id>agency</id> <id>da_agency</id>
<name>Agency</name> <name>Agency</name>
<summary>App for managing Agency of DA</summary> <summary>App for managing Agency of DA</summary>
<description><![CDATA[test]]></description> <description><![CDATA[test]]></description>
@ -13,10 +13,10 @@
<nextcloud min-version="16"/> <nextcloud min-version="16"/>
</dependencies> </dependencies>
<navigations> <navigations>
<navigation> <!--<navigation>
<name>Agenturmigration</name> <name>Agenturmigration</name>
<route>agency.page.index</route> <route>agency.page.index</route>
<icon>app.svg</icon> <icon>app.svg</icon>
</navigation> </navigation>-->
</navigations> </navigations>
</info> </info>

View File

@ -12,7 +12,7 @@ return [
['name' => 'agency#updateagencygroupcontributors', 'url' => '/updateagencygroupcontributors/{gid}', 'verb' => 'PUT'], ['name' => 'agency#updateagencygroupcontributors', 'url' => '/updateagencygroupcontributors/{gid}', 'verb' => 'PUT'],
['name' => 'agency#updateagencygroup', 'url' => '/updateagencygroup', 'verb' => 'POST'], ['name' => 'agency#updateagencygroup', 'url' => '/updateagencygroup', 'verb' => 'POST'],
['name' => 'agency#deleteagencygroup', 'url' => '/delagencygroup', 'verb' => 'POST'], ['name' => 'agency#deleteagencygroup', 'url' => '/delagencygroup', 'verb' => 'POST'],
//['name' => 'agency#getlogdata', 'url' => '/getdata', 'verb' => 'GET'],
# GROUPS # GROUPS
['name' => 'group#getagencygroups', 'url' => '/getagencygroups', 'verb' => 'GET'], ['name' => 'group#getagencygroups', 'url' => '/getagencygroups', 'verb' => 'GET'],

View File

@ -10,7 +10,6 @@ use OCP\IUserSession;
use OCP\AppFramework\Controller; use OCP\AppFramework\Controller;
use OCP\IRequest; use OCP\IRequest;
class Application extends App { class Application extends App {
protected $AppName = 'Agency'; protected $AppName = 'Agency';
@ -24,9 +23,7 @@ class Application extends App {
# ADding the Event, that User has Changed - update the logged User by Django. Works only by personal informations of the User! # ADding the Event, that User has Changed - update the logged User by Django. Works only by personal informations of the User!
$dispatcher->addServiceListener(UserChangedEvent::class, UserChangedByNC::class); $dispatcher->addServiceListener(UserChangedEvent::class, UserChangedByNC::class);
} }
} }
/* /*
@ -37,6 +34,7 @@ class UserChangedByNC extends Controller {
protected $session; protected $session;
protected $request; protected $request;
private $nclink = 'https://test.app.digitale-agentur.com'; private $nclink = 'https://test.app.digitale-agentur.com';
//private $nclink = 'http://host.docker.internal:8000';
public function __construct(string $AppName, IRequest $request, IUserSession $session) { public function __construct(string $AppName, IRequest $request, IUserSession $session) {
$this->request = $request; $this->request = $request;
@ -53,7 +51,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().'/'.$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);
} }
} }
@ -66,6 +63,7 @@ class LogoutByNC extends Controller {
protected $session; protected $session;
private $nclink = 'https://test.app.digitale-agentur.com'; private $nclink = 'https://test.app.digitale-agentur.com';
//private $nclink = 'http://host.docker.internal:8000';
public function __construct(string $AppName, IRequest $request, IUserSession $session) { public function __construct(string $AppName, IRequest $request, IUserSession $session) {
parent::__construct($AppName, $request); parent::__construct($AppName, $request);

View File

@ -144,6 +144,14 @@ class AgencyController extends Controller {
//return "OK!"; //return "OK!";
} }
/**
* @PublicPage
* @NoCSRFRequired
*
*/
public function getlogdata(){
return "THIS IS AWESOME";
}
} }

2
package-lock.json generated
View File

@ -1,5 +1,5 @@
{ {
"name": "agency", "name": "da_agency",
"version": "0.0.1", "version": "0.0.1",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,

View File

@ -1,5 +1,5 @@
{ {
"name": "agency", "name": "da_agency",
"description": "App for managing Agency of DA", "description": "App for managing Agency of DA",
"version": "0.0.1", "version": "0.0.1",
"author": "Holger Trampe", "author": "Holger Trampe",