Skip to content

Commit

Permalink
Make Customgroups installable for Nextcloud 12.03 owncloud#1
Browse files Browse the repository at this point in the history
  • Loading branch information
Flávio Gomes da Silva Lisboa committed Nov 3, 2017
1 parent 33545d4 commit 211f796
Show file tree
Hide file tree
Showing 7 changed files with 136 additions and 25 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ RCS/*
# eclipse
.project
.settings
.buildpath

# netbeans
nbproject
Expand Down
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
# ownCloud custom groups support
# Nextcloud custom groups support

This apps makes it possible for users to create their own custom groups and manage their members.
It is then possible to share files or folders with these groups.

## QA metrics on master branch:

[![Build Status](https://travis-ci.org/owncloud/customgroups.svg?branch=master)](https://travis-ci.org/owncloud/customgroups/branches)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/owncloud/customgroups/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/owncloud/customgroups/?branch=master)
[![Code Coverage](https://scrutinizer-ci.com/g/owncloud/customgroups/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/owncloud/customgroups/?branch=master)
<!-- Someday when Nextcloud team accepts this app as official ->
<!--[![Build Status](https://travis-ci.org/owncloud/customgroups.svg?branch=master)](https://travis-ci.org/owncloud/customgroups/branches)-->
<!--[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/owncloud/customgroups/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/owncloud/customgroups/?branch=master)-->
<!--[![Code Coverage](https://scrutinizer-ci.com/g/owncloud/customgroups/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/owncloud/customgroups/?branch=master)-->

## Requirements

* ownCloud 10.0
* Nextcloud 12.0.3

## Building the app

Expand All @@ -33,7 +34,7 @@ It is then possible to share files or folders with these groups.

* Run `make help` to get information about the different targets.

## Authors:
## Adapter from Owncloud app:

[Vincent Petry](https://github.com/PVince81/) :: PVince81 at owncloud dot com
[Flávio Gomes da Silva Lisboa](https://github.com/fgsl/) :: flavio dot lisboa at fgsl dot et dot br

90 changes: 90 additions & 0 deletions appinfo/database.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
<?xml version="1.0" encoding="UTF-8" ?>
<database>
<name>*dbname*</name>
<create>true</create>
<overwrite>false</overwrite>
<charset>utf8</charset>
<table>
<name>*dbprefix*custom_group</name>
<declaration>
<field>
<name>group_id</name>
<type>bigint</type>
<default>0</default>
<notnull>true</notnull>
<autoincrement>1</autoincrement>
<length>20</length>
<unsigned>true</unsigned>
</field>
<field>
<name>uri</name>
<type>text</type>
<notnull>true</notnull>
<length>255</length>
</field>
<field>
<name>display_name</name>
<type>text</type>
<notnull>true</notnull>
<length>64</length>
</field>
<index>
<name>cg_group_id_index</name>
<primary>true</primary>
<unique>true</unique>
<field>
<name>group_id</name>
<sorting>ascending</sorting>
</field>
</index>
<index>
<name>cg_uri_index</name>
<primary>true</primary>
<unique>true</unique>
<field>
<name>uri</name>
<sorting>ascending</sorting>
</field>
</index>
</declaration>
</table>
<table>
<name>*dbprefix*custom_group_member</name>
<declaration>
<field>
<name>group_id</name>
<type>bigint</type>
<notnull>true</notnull>
<length>20</length>
<unsigned>true</unsigned>
</field>
<field>
<name>user_id</name>
<type>text</type>
<notnull>true</notnull>
<length>64</length>
</field>
<field>
<name>role</name>
<type>integer</type>
<default>0</default>
<notnull>true</notnull>
<length>4</length>
<unsigned>true</unsigned>
</field>
<index>
<name>cg_group_id_index</name>
<primary>true</primary>
<unique>true</unique>
<field>
<name>group_id</name>
<sorting>ascending</sorting>
</field>
<field>
<name>user_id</name>
<sorting>ascending</sorting>
</field>
</index>
</declaration>
</table>
</database>
22 changes: 11 additions & 11 deletions appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,24 @@
<namespace>CustomGroups</namespace>
<summary>Enhance collaboration with user-defined sharing groups</summary>
<description>
When working in larger organizations, the number of users in a file sharing platform like ownCloud quickly reaches a point where the segmentation of users becomes very relevant.
With ownCloud's Custom Groups functionality not only admins but also users are able to create groups of users for quick and easy sharing purposes.
When working in larger organizations, the number of users in a file sharing platform like Nextcloud quickly reaches a point where the segmentation of users becomes very relevant.
With Nextcloud's Custom Groups functionality not only admins but also users are able to create groups of users for quick and easy sharing purposes.
This makes it easier than ever for users to collaborate and work efficiently as a team while saving administrators unnecessary work.

**Using Custom Groups in ownCloud**
While using the ownCloud web-interface simply click 'Settings' in the top right-hand corner and navigate to the 'Custom Groups' section in the menu. Here users can create and manage their Custom Groups with a few simple clicks. Custom Groups are visible only to members of the group and ownCloud administrators can see and modify all Custom Groups of an instance.
**Using Custom Groups in Nextcloud**
While using the Nextcloud web-interface simply click 'Settings' in the top right-hand corner and navigate to the 'Custom Groups' section in the menu. Here users can create and manage their Custom Groups with a few simple clicks. Custom Groups are visible only to members of the group and Nextcloud administrators can see and modify all Custom Groups of an instance.
Additionally the application provides permission management capabilities to enable a collaborative management of Custom Groups: Members of a group can be classified either as 'Member' or 'Group admin'. Members can share with the group, view the member list and leave the group. Group admins, in addition, can add and remove members, rename or delete the group and set permissions of other members.

Sharing with a Custom Group is as easy and quick as always. Just click on the sharing symbol of a file or folder, go to the Users and Groups tab in the Sharing menu and select the relevant Custom Group from the dropdown menu. Also, all ownCloud clients (Desktop/Android/iOS) can be used to share with Custom Groups conveniently.
Sharing with a Custom Group is as easy and quick as always. Just click on the sharing symbol of a file or folder, go to the Users and Groups tab in the Sharing menu and select the relevant Custom Group from the dropdown menu. Also, all Nextcloud clients (Desktop/Android/iOS) can be used to share with Custom Groups conveniently.

### Resources:
- [ownCloud X Insights: Custom Groups](https://www.youtube.com/watch?v=jthRk6gw_hE)
- [Nextcloud X Insights: Custom Groups](https://www.youtube.com/watch?v=jthRk6gw_hE)
- [App of the Week Blog: Custom Groups](https://owncloud.com/app-week-custom-groups/)</description>
<website>https://github.com/owncloud/customgroups/</website>
<bugs>https://github.com/owncloud/customgroups/issues</bugs>
<repository type="git">http://github.com/owncloud/customgroups.git</repository>
<bugs>https://github.com/fgsl/customgroups/issues</bugs>
<repository type="git">http://github.com/fgsl/customgroups.git</repository>
<licence>AGPL</licence>
<author>Vincent Petry</author>
<author>Flávio Gomes da Silva Lisboa</author>
<version>0.3.5</version>
<documentation>
<user>https://doc.owncloud.com/server/latest/user_manual/files/webgui/custom_groups.html</user>
Expand All @@ -36,7 +36,7 @@ Sharing with a Custom Group is as easy and quick as always. Just click on the sh
</types>
<use-migrations>true</use-migrations>
<dependencies>
<owncloud min-version="10.0.3" max-version="10.0.99" />
<nextcloud min-version="12.0.3" max-version="12.0.99" />
</dependencies>
<sabre>
<plugins>
Expand All @@ -53,4 +53,4 @@ Sharing with a Custom Group is as easy and quick as always. Just click on the sh
<settings-sections>
<personal>OCA\CustomGroups\SettingsSection</personal>
</settings-sections>
</info>
</info>
4 changes: 2 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "owncloud-customgroups",
"name": "fgsl-customgroups",
"version": "0.1",
"homepage": "https://github.com/owncloud/customgroups/",
"homepage": "https://github.com/fgsl/customgroups/",
"license": "AGPL",
"private": true,
"ignore": [],
Expand Down
19 changes: 19 additions & 0 deletions lib/AdminPanel.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ public function __construct(IConfig $config) {
$this->config = $config;
}

/**
* @deprecated
* @todo move code to getForm method
* @return \OCP\Template
*/
public function getPanel() {
$tmpl = new Template('customgroups', 'admin');
$restrictToSubadmins = $this->config->getAppValue('customgroups', 'only_subadmin_can_create', 'false') === 'true';
Expand All @@ -49,8 +54,22 @@ public function getPriority() {
return 0;
}

/**
* @deprecated
* @todo move code to getSection method
* @return string
*/
public function getSectionID() {
return 'sharing';
}

public function getForm()
{
return $this->getPanel();
}

public function getSection()
{
return $this->getSectionId();
}
}
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "owncloud-customgroups-dev",
"name": "fgsl-customgroups-dev",
"version": "0.1.0",
"author": {
"name": "Vincent Petry",
"email": "pvince81@owncloud.com"
"name": "Flávio Gomes da Silva Lisboa",
"email": "flavio.lisboa@fgsl.eti.br"
},
"private": true,
"homepage": "https://github.com/owncloud/",
"homepage": "https://github.com/fgsl/customgroups",
"contributors": [],
"dependencies": {},
"devDependencies": {
Expand Down Expand Up @@ -42,4 +42,4 @@
"extensions": "js,handlebars"
}
}
}
}

0 comments on commit 211f796

Please sign in to comment.