Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove modal and vue.js, create guests only by email #149

Merged
merged 3 commits into from
Sep 14, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .babelrc

This file was deleted.

22 changes: 1 addition & 21 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,34 +36,14 @@ endif
endif
endif

all: build

# Fetch JS dependencies and compile the JS
.PHONY: build
build: npm
npm run build

# Fetch JS dependencies and compile the JS
.PHONY: dev
dev: npm
npm run dev

# Node modules
.PHONY: npm
npm:
npm install

# Remove the appstore build and generated guests bundle
.PHONY: clean
clean:
rm -rf ./build
rm -f js/guests.bundle.js

# Same as clean but also removes dependencies installed by npm
.PHONY: distclean
distclean: clean
rm -rf node_modules
rm -f package-lock.json

# Build the source and appstore package
.PHONY: dist
Expand All @@ -72,7 +52,7 @@ dist:

# Build the source package for the app store, ignores php and js tests
.PHONY: appstore
appstore: build
appstore:
rm -rf $(dist_dir)
mkdir -p $(dist_dir)/$(app_name)
cp -R $(all_src) $(dist_dir)/$(app_name)
Expand Down
24 changes: 2 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,7 @@ Create a guest user by typing his email address in to the sharing dialog. The gu
will receive an email invite with a link to create an account. He has only access
to files which are shared with him.


Furthermore, the administrator has to whitelist the applications that guests can use.
By default settings,avatar,files_trashbin,files_versions,files_sharing,files_texteditor,activity,firstrunwizard,gallery are allowed.


## How to set up your frontend development environment

The front end section is based on the [Vue.js 2.0](https://vuejs.org/) framework. The build process is based on Webpack. To get started, you need the latest version of [node.js and npm](https://nodejs.org) installed.

***

### Setup

You can install the development environment and get webpack started (watcher included) by running:

`make dev`

***

### Building

To build the uglified / minified muted version run the following:
By default settings, avatar, files_trashbin, files_versions, files_sharing,
files_texteditor, activity, firstrunwizard, gallery are allowed.

`make`
11 changes: 9 additions & 2 deletions appinfo/app.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php
/**
* @author Thomas Heinisch <t.heinisch@bw-tech.de>
* @author Felix Heidecke <felix@heidecke.me>
* @author Ilja Neumann <ineumann@owncloud.com>
* @author Jörn Friedrich Dreyer <jfd@butonic.de>
Expand All @@ -22,10 +23,16 @@
*
*/

\OCP\Util::addScript('guests', 'guests.bundle');
$eventDispatcher = \OC::$server->getEventDispatcher();
$eventDispatcher->addListener(
'OCA\Files::loadAdditionalScripts',
function() {
\OCP\Util::addScript('guests', 'sharedialogview');
}
);

$config = \OC::$server->getConfig();
$groupName = $config->getAppValue('guests', 'group', 'guest_app');
$groupName = $config->getAppValue('guests', 'group', \OCA\Guests\GroupBackend::DEFAULT_NAME);

\OC::$server->getGroupManager()->addBackend(new \OCA\Guests\GroupBackend($groupName));
\OCP\Util::connectHook('OCP\Share', 'post_shared', '\OCA\Guests\Hooks', 'postShareHook');
Expand Down
7 changes: 7 additions & 0 deletions appinfo/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,11 @@
'verb' => 'PUT'
]
],
'ocs' => [
[
'name' => 'sharees#search',
'url' => '/api/v1/sharees',
'verb' => 'GET',
]
]
];
2 changes: 1 addition & 1 deletion controller/settingscontroller.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public function getConfig() {
$whitelist = $this->config->getAppValue('guests', 'whitelist', AppWhitelist::DEFAULT_WHITELIST);
$whitelist = explode(',', $whitelist);
return new DataResponse([
'group' => $this->config->getAppValue('guests', 'group', 'guests'),
'group' => $this->config->getAppValue('guests', 'group', \OCA\Guests\GroupBackend::DEFAULT_NAME),
'useWhitelist' => $useWhitelist,
'whitelist' => $whitelist,
]);
Expand Down
11 changes: 6 additions & 5 deletions js/guests.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/**
* ownCloud
*
* @author Jörn Friedrich Dreyer <jfd@owncloud.com>
* @author Thomas Heinisch <t.heinisch@bw-tech.de>
* @copyright (C) 2015-2017 ownCloud, Inc.
*
* @copyright Copyright (c) 2017, ownCloud GmbH
* @license GPL-2.0
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
Expand All @@ -15,8 +15,9 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License, version 3,
* along with this program. If not, see <http://www.gnu.org/licenses/>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
(function() {

Expand Down
Loading