Commit 94e06449 authored by Côme Chilliet's avatar Côme Chilliet
Browse files

Merge branch '6053-cloud-plugin-owncloud-nextcloud' into '1.4-dev'

Resolve "Cloud plugin (OwnCloud/NextCloud)"

See merge request fusiondirectory/fd-plugins!736
parents 9990f41d 24e9a980
##
## nextcloud-fd.schema - Fusion Directory NextCloud plugin
##
# Attributes
attributetype ( 1.3.6.1.4.1.38414.80.1.1 NAME 'fdNextCloudQuota'
DESC 'FusionDirectory - NextCloud quota'
EQUALITY caseIgnoreMatch
SUBSTR caseIgnoreSubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15)
attributetype ( 1.3.6.1.4.1.38414.80.1.2 NAME 'fdNextCloudHomeFolder'
DESC 'FusionDirectory - NextCloud home folder'
EQUALITY caseIgnoreMatch
SUBSTR caseIgnoreSubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15)
# Objectclasses
objectclass (1.3.6.1.4.1.38414.80.2.1 NAME 'fdNextCloudAccount'
SUP top AUXILIARY
DESC 'FusionDirectory - NextCloud Account'
MUST ( )
MAY ( fdNextCloudQuota $ fdNextCloudHomeFolder ) )
# NextCloud plugin.
# Copyright (C) 2020 FusionDirectory Project
# Copyright (C) 2020 Clement Oudot (Worteks)
# This file is distributed under the same license as the FusionDirectory package.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: FusionDirectory VERSION\n"
"Report-Msgid-Bugs-To: bugs@fusiondirectory.org\n"
"POT-Creation-Date: 2020-05-21 15:15+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FusionDirectory project <contact@fusiondirectory.org>\n"
"Language-Team: English\n"
"Language: en\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: personal/nextcloud/class_nextcloudAccount.inc:38
msgid "NextCloud"
msgstr "NextCloud"
#: personal/nextcloud/class_nextcloudAccount.inc:39
msgid "NextCloud settings"
msgstr "NextCloud settngs"
#: personal/nextcloud/class_nextcloudAccount.inc:56
msgid "NextCloud account"
msgstr "NextCloud account"
#: personal/nextcloud/class_nextcloudAccount.inc:59
msgid "File quota"
msgstr "File quota"
#: personal/nextcloud/class_nextcloudAccount.inc:59
msgid "Define quota size in Bytes"
msgstr "Define quota size in Bytes"
#: personal/nextcloud/class_nextcloudAccount.inc:63
msgid "Home folder"
msgstr "Home folder"
#: personal/nextcloud/class_nextcloudAccount.inc:63
msgid "Define the home folder"
msgstr "Define the home folder"
<?php
/*
This code is part of FusionDirectory (http://www.fusiondirectory.org/)
Copyright (C) 2020 FusionDirectory
Copyright (C) 2020 Clement Oudot <clement.oudot@worteks.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
*/
/*!
\brief NextCloud plugin
This class provides the functionality to read and write all attributes
relevant for NextCloud accounts from/to the LDAP.
*/
class nextcloudAccount extends simplePlugin
{
protected $displayHeader = TRUE;
static function plInfo (): array
{
return [
'plShortName' => _('NextCloud'),
'plDescription' => _('NextCloud settings'),
'plIcon' => 'geticon.php?context=places&icon=folder&size=48',
'plSmallIcon' => 'geticon.php?context=places&icon=folder&size=16',
'plSelfModify' => TRUE,
'plObjectClass' => ['fdNextCloudAccount'],
'plObjectType' => ['user'],
'plProvidedAcls' => parent::generatePlProvidedAcls(static::getAttributesInfo()),
];
}
/*!
* \brief The main function : information about attributes
*/
static function getAttributesInfo (): array
{
return [
'main' => [
'name' => _('NextCloud account'),
'attrs' => [
new BytesSizeAttribute(
_('File quota'), _('Define quota size'),
'fdNextCloudQuota', FALSE
),
new PathAttribute(
_('Home folder'), _('Define the home folder'),
'fdNextCloudHomeFolder', FALSE
)
]
]
];
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment