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

[WIP] Nextcloud compatibility #1

Merged
merged 61 commits into from
Dec 12, 2018
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
0b8529d
Mark compatible with 12
LukasReschke Apr 28, 2017
f8e909e
Use Nextcloud settings panel
LukasReschke Apr 28, 2017
25a9571
Use TemplateResponse
LukasReschke Apr 28, 2017
51d9b48
Use SHARE_TYPE_GUEST
LukasReschke Apr 28, 2017
e931baf
Mark compatible with 12
LukasReschke Apr 28, 2017
7f1a6e0
Use Nextcloud settings panel
LukasReschke Apr 28, 2017
9d9419a
Use TemplateResponse
LukasReschke Apr 28, 2017
a11c762
Use SHARE_TYPE_GUEST
LukasReschke Apr 28, 2017
672ddf3
Use owncloud as appname
rullzer Apr 28, 2017
f0e0326
Merge branch 'make-compatible-with-nextcloud' of https://github.com/n…
LukasReschke Apr 28, 2017
7b461bb
Merge branch 'master' into make-compatible-with-nextcloud
LukasReschke Apr 28, 2017
b6964bc
Use proper sidebar icon
LukasReschke Apr 28, 2017
8c5781b
Fix intergration tests paths
rullzer Apr 28, 2017
26c4d11
Get basic functionality working
icewind1991 May 4, 2017
4c1dff2
add always enabled guest apps to ensure minimal functionality
icewind1991 May 4, 2017
19e38bf
better whitelist configuration
icewind1991 May 4, 2017
2debade
more descriptive guest uid's and cleaner guest dialog
icewind1991 May 5, 2017
bb0100b
use displayname in email recipient
icewind1991 May 5, 2017
0a63a66
cache data should be writable
icewind1991 May 5, 2017
78f25aa
fix guest detection
icewind1991 May 9, 2017
2568838
better naming
icewind1991 May 9, 2017
43d3344
filter navigation entries that are blocked for the guest
icewind1991 May 9, 2017
6e755f0
proper navigation filtering
icewind1991 May 10, 2017
13ffc37
set activation links to never expire
icewind1991 May 10, 2017
8515fbb
use themed email for invitation
icewind1991 May 10, 2017
457c03a
share notifications for existing guests
icewind1991 May 10, 2017
bc6f62b
dont allow creating guests with an exising email
icewind1991 May 11, 2017
d0ff5ab
remove todo
icewind1991 May 11, 2017
8d7b3cb
fix webdav and merged js not being allowed
icewind1991 May 22, 2017
8daac06
enable in 13
icewind1991 May 22, 2017
13a5d31
mark compatible with 14
icewind1991 Jun 13, 2018
791fc01
make group id non configurable
icewind1991 Jun 13, 2018
9dcdfac
nc 14 compatibility
icewind1991 Jun 13, 2018
76dad15
fix readonly wrapper not getting applied
icewind1991 Jun 13, 2018
d8b4331
fix login
icewind1991 Jun 13, 2018
039a1fa
remove files external from default allowed apps
icewind1991 Jun 13, 2018
f09b3af
hide contacts menu for guests
icewind1991 Jun 13, 2018
91dec39
store guests in their own user backend.
icewind1991 Jun 15, 2018
5b3c876
generate userid serverside
icewind1991 Jun 19, 2018
88a8a2c
use raw email as userid
icewind1991 Jun 19, 2018
7e58d8a
give guests a 0b quota
icewind1991 Jun 19, 2018
3a9fbd8
fix logout button
icewind1991 Jun 19, 2018
e7bc2d6
Fix double mail
icewind1991 Jun 20, 2018
5c65830
guest dialog polish
icewind1991 Jun 20, 2018
b7f5bcc
makefile
icewind1991 Jun 20, 2018
eadae2f
prevent guests from creating more guests
icewind1991 Jun 21, 2018
8b31b77
fix non guests login
icewind1991 Jun 26, 2018
a70fbfb
allow creating guest account from email
icewind1991 Jul 6, 2018
9f5a2c2
fix user listing
icewind1991 Jul 10, 2018
36148ad
restrict filesystem access when using basic auth
icewind1991 Jul 10, 2018
702eb28
block external shares for guests by defailt
icewind1991 Jul 10, 2018
7c54f64
prevent files external error message
icewind1991 Jul 10, 2018
4f35fb0
fixes the share autocomplete js plugin. nextcloud/server#10114
weeman1337 Aug 15, 2018
f26d724
nc 15 compat
icewind1991 Sep 14, 2018
de8c56d
show error message on share
icewind1991 Sep 14, 2018
9137834
fix guest dialog not being visible
icewind1991 Sep 14, 2018
474e921
better email detection
icewind1991 Sep 14, 2018
16ab665
fix double entries in autocomplete
icewind1991 Sep 14, 2018
31a678e
add screenshots
icewind1991 Sep 14, 2018
33b99a3
update info.xml
icewind1991 Sep 14, 2018
8bc18f3
Fix 'index.php' being blocked by the whitelist
icewind1991 Oct 16, 2018
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
6 changes: 3 additions & 3 deletions appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@
</description>
<version>0.4.1</version>
<licence>AGPL</licence>
<author>owncloud.org</author>
<author>Nextcloud</author>
<dependencies>
<owncloud min-version="10.0" max-version="10.0" />
<php min-version="5.4" />
<nextcloud min-version="12" max-version="12" />
</dependencies>
<category>collaboration</category>
<types>
<authentication/>
</types>
<settings>
<admin>OCA\Guests\Settings\Admin</admin>
<admin-section>OCA\Guests\Settings\Section</admin-section>
</settings>
<screenshot>https://raw.githubusercontent.com/owncloud/screenshots/ea949ddd1d35ea22aceb68609587c5536aeda5f6/guests/new_guest.png</screenshot>
</info>
24 changes: 7 additions & 17 deletions settings/admin.php → lib/Settings/Admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,36 +21,26 @@

namespace OCA\Guests\Settings;

use OCP\Template;
use OCP\AppFramework\Http\TemplateResponse;

class Admin implements \OCP\Settings\ISettings
{

/**
* The panel controller method that returns a template to the UI
*
* @since 10.0
* @return \OCP\AppFramework\Http\TemplateResponse | \OCP\Template
* {@inheritdoc}
*/
public function getPanel() {
return new Template('guests', 'settings/admin');
public function getForm() {
return new TemplateResponse('guests', 'settings/admin');
}

/**
* A string to identify the section in the UI / HTML and URL
*
* @since 10.0
* @return string
* {@inheritdoc}
*/
public function getSectionID() {
public function getSection() {
return 'guests';
}

/**
* The number used to order the section in the UI.
*
* @since 10.0
* @return int between 0 and 100, with 100 being the highest priority
* {@inheritdoc}
*/
public function getPriority() {
return 0;
Expand Down
73 changes: 73 additions & 0 deletions lib/Settings/Section.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
<?php
/**
* @copyright Copyright (c) 2017 Lukas Reschke <[email protected]>
*
* @author Lukas Reschke <[email protected]>
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program 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 program. If not, see <http://www.gnu.org/licenses/>.
*
*/

namespace OCA\Guests\Settings;

use OCP\IL10N;
use OCP\IURLGenerator;
use OCP\Settings\IIconSection;

class Section implements IIconSection {
/** @var IL10N */
private $l;
/** @var IURLGenerator */
private $url;

/**
* @param IURLGenerator $url
* @param IL10N $l
*/
public function __construct(IURLGenerator $url, IL10N $l) {
$this->url = $url;
$this->l = $l;
}

/**
* {@inheritdoc}
*/
public function getID() {
return 'guests';
}

/**
* {@inheritdoc}
*/
public function getName() {
return $this->l->t('Guests');
}

/**
* {@inheritdoc}
*/
public function getPriority() {
return 30;
}

/**
* {@inheritdoc}
*/
public function getIcon() {
// TODO: Jan needs to create a proper icon
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO can be removed :)

return $this->url->imagePath('logreader', 'app-dark.svg');
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jancborchardt Can you please create an icon? THX.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, see #13 :)

}
}