Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
sualko committed Jan 28, 2015
1 parent 7ed7246 commit 0c1c107
Show file tree
Hide file tree
Showing 20 changed files with 1,803 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .project
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>user_hiorg</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
</natures>
</projectDescription>
661 changes: 661 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

28 changes: 28 additions & 0 deletions ajax/setSettings.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php
/**
* ownCloud -user_hiorg
*
* @author Klaus Herberth
* @copyright 2015 Klaus Herberth <[email protected]>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
* License as published by the Free Software Foundation; either
* version 3 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU Affero General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
*/

OCP\User::checkAdminUser();
OCP\JSON::callCheck();

OCP\Config::setAppValue ( 'user_hiorg', 'ov', $_POST['ov'] );

echo 'true';
40 changes: 40 additions & 0 deletions appinfo/app.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?php

/**
* ownCloud -user_hiorg
*
* @author Klaus Herberth
* @copyright 2015 Klaus Herberth <[email protected]>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
* License as published by the Free Software Foundation; either
* version 3 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU Affero General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
*/

require_once OC_App::getAppPath('user_hiorg').'/lib/user_hiorg.php';

OCP\Util::connectHook('OC_User', 'logout', '\OCA\user_hiorg\Hooks', 'logout');

OC_User::clearBackends();
OC_User::registerBackend("HIORG");
OC_User::useBackend( "HIORG" );

OCP\App::registerAdmin( 'user_hiorg', 'settings' );

OCP\App::addNavigationEntry( array(
'id' => 'user_hiorg',
'order' => 74,
'href' => OCP\Util::linkTo( 'user_hiorg', 'index.php' ),
'icon' => OCP\Util::imagePath( 'user_hiorg', 'hiorg-icon.png' ),
'name' => 'HiOrg Server'
));
14 changes: 14 additions & 0 deletions appinfo/info.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0"?>
<info>
<id>user_hiorg</id>
<name>Hiorg Server</name>
<description>Integration of Hiorg-Server into OwnCloud inclusive user backend.</description>
<version>0.1.0</version>
<licence>AGPL</licence>
<author>Klaus Herberth</author>
<requiremin>7</requiremin>
<types>
<type>prelogin</type>
<type>authentication</type>
</types>
</info>
1 change: 1 addition & 0 deletions appinfo/version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.1.0
Binary file added img/hiorg-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
122 changes: 122 additions & 0 deletions img/hiorg-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
120 changes: 120 additions & 0 deletions img/hiorg-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 35 additions & 0 deletions index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?php

/**
* ownCloud -user_hiorg
*
* @author Klaus Herberth
* @copyright 2015 Klaus Herberth <[email protected]>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
* License as published by the Free Software Foundation; either
* version 3 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU Affero General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
*/

OCP\User::checkLoggedIn();

$token = \OC::$server->getSession()->get('user_hiorg_token');
$ov = OCP\Config::getAppValue ( 'user_hiorg', 'ov' );

OCP\App::setActiveNavigationEntry( 'user_hiorg' );

$url = OC_USER_HIORG::SSOURL."?ov=$ov&login=1&token=$token";

$tmpl = new OCP\Template( 'user_hiorg', 'main', 'user' );
$tmpl->assign( 'url', $url );
$tmpl->printPage();
Loading

0 comments on commit 0c1c107

Please sign in to comment.