Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
fusiondirectory
fusiondirectory
Commits
949da7dc
Unverified
Commit
949da7dc
authored
4 years ago
by
Côme Chilliet
Browse files
Options
Download
Patches
Plain Diff
feat(core) Add schema and fix ini importation
issue #6152
parent
62afbaa9
dev
6342-update-the-locales-for-1-5
6344-template-issue-when-creating-a-template-with-empty-password-error-message-should-not-be-seen
6365-core-locking-mechanism-is-not-changing-the-mail-ressource-it-does-lock-the-mail-account
6365-core-when-lock-mechanism-is-trigger-the-user-should-not-be-editable-if-not-unlock
6378-orcid-test-method-is-wrong-and-break-orcid-saving
core-php8
master
fusiondirectory-1.5
fusiondirectory-1.4
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
contrib/openldap/core-fd.schema
+35
-0
contrib/openldap/core-fd.schema
plugins/addons/subscription/class_subscriptionInfo.inc
+15
-4
plugins/addons/subscription/class_subscriptionInfo.inc
with
50 additions
and
4 deletions
+50
-4
contrib/openldap/core-fd.schema
+
35
−
0
View file @
949da7dc
...
...
@@ -63,6 +63,36 @@ attributetype ( 1.3.6.1.4.1.38414.62.1.4 NAME 'fdSnapshotObjectType'
SUBSTR caseIgnoreSubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE )
# Subscriptions
attributetype ( 1.3.6.1.4.1.38414.62.11.1 NAME 'fdSubscriptionStartDate'
DESC 'FusionDirectory - Subscription Starting Date'
EQUALITY generalizedTimeMatch
ORDERING generalizedTimeOrderingMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.24 SINGLE-VALUE )
attributetype ( 1.3.6.1.4.1.38414.62.11.2 NAME 'fdSubscriptionEndDate'
DESC 'FusionDirectory - Subscription End Date'
EQUALITY generalizedTimeMatch
ORDERING generalizedTimeOrderingMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.24 SINGLE-VALUE )
attributetype ( 1.3.6.1.4.1.38414.62.11.3 NAME 'fdSubscriptionType'
DESC 'FusionDirectory - Subscription type'
EQUALITY caseIgnoreMatch
SUBSTR caseIgnoreSubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE )
attributetype ( 1.3.6.1.4.1.38414.62.11.4 NAME 'fdSubscriptionContractId'
DESC 'FusionDirectory - Subscription contract ID'
EQUALITY caseIgnoreMatch
SUBSTR caseIgnoreSubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE )
attributetype ( 1.3.6.1.4.1.38414.62.11.5 NAME 'fdSubscriptionName'
DESC 'FusionDirectory - Subscription client name'
SUP name )
# Classes
objectclass ( 1.3.6.1.4.1.10098.1.2.1.19.4 NAME 'gosaDepartment' SUP top AUXILIARY
...
...
@@ -95,3 +125,8 @@ objectclass ( 1.3.6.1.4.1.10098.1.2.1.19.19 NAME 'gosaSnapshotObject'
objectclass ( 1.3.6.1.4.1.38414.62.2.1 NAME 'fdLockEntry' SUP top STRUCTURAL
DESC 'FusionDirectory - Class for FD locking'
MUST ( fdUserDn $ fdObjectDn $ cn $ fdLockTimestamp ))
objectclass ( 1.3.6.1.4.1.38414.62.2.2 NAME 'fdSubscriptionInformation' SUP top STRUCTURAL
DESC 'FusionDirectory - Information about current subscription'
MUST ( cn )
MAY ( fdSubscriptionStartDate $ fdSubscriptionEndDate $ fdSubscriptionType $ fdSubscriptionContractId $ fdSubscriptionName ))
This diff is collapsed.
Click to expand it.
plugins/addons/subscription/class_subscriptionInfo.inc
+
15
−
4
View file @
949da7dc
...
...
@@ -20,7 +20,14 @@
class
subscriptionInfo
extends
simplePlugin
{
public
static
$subscriptionAttributes
=
[
'fdSubscriptionType'
,
'fdSubscriptionContractId'
,
'fdSubscriptionStartDate'
,
'fdSubscriptionEndDate'
];
/* ldap attribute => ini variable */
public
static
$subscriptionAttributes
=
[
'fdSubscriptionName'
=>
'Name'
,
'fdSubscriptionType'
=>
'Type'
,
'fdSubscriptionContractId'
=>
'Contract'
,
'fdSubscriptionStartDate'
=>
'StartDate'
,
'fdSubscriptionEndDate'
=>
'EndDate'
,
];
public
static
function
plInfo
():
array
{
...
...
@@ -29,7 +36,7 @@ class subscriptionInfo extends simplePlugin
'plTitle'
=>
_
(
'Subscription information'
),
'plDescription'
=>
_
(
'Information about your FusionDirectory subscription'
),
'plIcon'
=>
'geticon.php?context=applications&icon=fusiondirectory&size=48'
,
'plObjectClass'
=>
[
'fdSubscriptionInfo'
],
'plObjectClass'
=>
[
'fdSubscriptionInfo
rmation
'
],
'plObjectType'
=>
[
'subscriptionInfo'
=>
[
'name'
=>
_
(
'Subscription information'
),
...
...
@@ -51,6 +58,10 @@ class subscriptionInfo extends simplePlugin
new
HiddenAttribute
(
'cn'
,
TRUE
,
'subscription'
),
new
DisplayLDAPAttribute
(
_
(
'Name'
),
_
(
'Subscription name'
),
'fdSubscriptionName'
,
TRUE
),
new
DisplayLDAPAttribute
(
_
(
'Type'
),
_
(
'Subscription type'
),
'fdSubscriptionType'
,
TRUE
...
...
@@ -112,8 +123,8 @@ class subscriptionInfo extends simplePlugin
$error
->
display
();
}
else
{
/* Import data and save it to the LDAP */
foreach
(
static
::
$subscriptionAttributes
as
$attr
)
{
$this
->
attributesAccess
[
$attr
]
->
setValue
(
$data
[
$
att
r
]
??
''
);
foreach
(
static
::
$subscriptionAttributes
as
$attr
=>
$iniVar
)
{
$this
->
attributesAccess
[
$attr
]
->
setValue
(
$data
[
$
iniVa
r
]
??
''
);
}
$errors
=
$this
->
parent
->
save
();
msg_dialog
::
displayChecks
(
$errors
);
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets