Skip to content

Commit a492400

Browse files
author
Sascha Pfeiffer
committed
Added policies
Signed-off-by: Sascha Pfeiffer <sascha.pfeiffer@esaqa.com>
1 parent 5bc3b34 commit a492400

File tree

19 files changed

+1749
-94
lines changed

19 files changed

+1749
-94
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[![coverage report](https://gitlab.com/psono/psono-admin-client/badges/master/coverage.svg)](https://gitlab.com/psono/psono-admin-client/commits/master)
44
[![Code Climate](https://codeclimate.com/github/psono/psono-admin-client/badges/gpa.svg)](https://codeclimate.com/github/psono/psono-admin-client)
55
[![build status](https://img.shields.io/docker/pulls/psono/psono-admin-client.svg)](https://hub.docker.com/r/psono/psono-admin-client/)
6-
[![Discord](https://img.shields.io/badge/Discord-join%20chat-738bd7.svg)](https://discord.gg/RuSvEjj)
6+
[![Discord](https://img.shields.io/badge/Discord-join%20chat-738bd7.svg)](https://discord.gg/VmBMzTSbGV)
77
[![POEditor](https://img.shields.io/badge/POEditor-Help%20translate-brightgreen.svg)](https://poeditor.com/join/project?hash=xwGlVVPZbM)
88

99
# Canonical source

public/locales/de/translation.json

+41-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,37 @@
11
{
2+
"SETTINGS": "Einstellungen",
3+
"OVERWRITE": "Überschreiben",
4+
"VALUE": "Wert",
5+
"POLICY_COMPLIANCE_DISABLE_API_KEYS": "API Keys deaktivieren",
6+
"POLICY_COMPLIANCE_DISABLE_DELETE_ACCOUNT": "Account löschen deaktivieren",
7+
"POLICY_COMPLIANCE_DISABLE_EMERGENCY_CODES": "Notfall Codes deaktivieren",
8+
"POLICY_COMPLIANCE_DISABLE_EXPORT": "Export deaktivieren",
9+
"POLICY_COMPLIANCE_DISABLE_EXPORT_OF_SHARED_ITEMS": "Export von gesharten Einträgen deaktivieren",
10+
"POLICY_COMPLIANCE_DISABLE_FILE_REPOSITORIES": "Daten Repositories deaktivieren",
11+
"POLICY_COMPLIANCE_DISABLE_LINK_SHARES": "Link shares deaktivieren",
12+
"POLICY_COMPLIANCE_DISABLE_OFFLINE_MODE": "Offline Mode deaktivieren",
13+
"POLICY_COMPLIANCE_DISABLE_SHARES": "Shares deaktivieren",
14+
"POLICY_COMPLIANCE_DISABLE_RECOVERY_CODES": "Wiederherstellungs Codes deaktivieren",
15+
"POLICY_COMPLIANCE_DISABLE_UNMANAGED_GROUPS": "Ungemanagte Gruppen deaktivieren",
16+
"POLICY_COMPLIANCE_ENFORCE_2FA": "Zwei-Faktor erzwingen",
17+
"POLICY_COMPLIANCE_ENFORCE_CENTRAL_SECURITY_REPORTS": "Zentrale Security Reports erzwingen",
18+
"POLICY_DISABLE_CENTRAL_SECURITY_REPORTS": "Zentrale Security Reports deaktivieren",
19+
"POLICY_DISABLE_CALLBACKS": "Callbacks deaktivieren",
20+
"POLICY_ALLOW_USER_SEARCH_BY_EMAIL": "Suche von Nutzern mit E-Mail Adressen erlauben",
21+
"POLICY_ALLOW_USER_SEARCH_BY_USERNAME_PARTIAL": "Suche von Nutzern mit partiellen Nutzernamen erlauben",
22+
"POLICY_COMPLIANCE_CENTRAL_SECURITY_REPORT_SECURITY_RECURRENCE_INTERVAL": "Wiederholungsintervall in Sekunden für zentrale Security Reports",
23+
"POLICY_COMPLIANCE_MAX_OFFLINE_CACHE_TIME_VALID": "Maximales Alter in Sekunden seit der letzten Serververbindung des Offline Caches",
24+
"POLICY_COMPLIANCE_PASSWORD_GENERATOR_DEFAULT_PASSWORD_LENGTH": "Passwortgenerator Default Einstellung für die Länge von Passwörtern",
25+
"POLICY_COMPLIANCE_PASSWORD_GENERATOR_DEFAULT_LETTERS_UPPERCASE": "Passwortgenerator Default Einstellung für die Großbuchstaben",
26+
"POLICY_COMPLIANCE_PASSWORD_GENERATOR_DEFAULT_LETTERS_LOWERCASE": "Passwortgenerator Default Einstellung für die Kleinbuchstaben",
27+
"POLICY_COMPLIANCE_PASSWORD_GENERATOR_DEFAULT_NUMBERS": "Passwortgenerator Default Einstellung für die Zahlen",
28+
"POLICY_COMPLIANCE_PASSWORD_GENERATOR_DEFAULT_SPECIAL_CHARS": "Passwortgenerator Default Einstellung für die Sonderzeichen",
29+
"POLICY_ALLOWED_FILE_REPOSITORY_TYPES": "Erlaubte Datei Repository Typen",
30+
"POLICY_ALLOWED_SECOND_FACTORS": "Erlaubte zweite Faktoren",
31+
"CONFIGURATION": "Konfiguration",
32+
"POLICY_DETAILS": "Richtlinie Details",
33+
"EDIT_POLICY": "Richtlinie bearbeiten",
34+
"UPDATE_POLICY_DETAILS": "Richtlinien Details aktualisieren",
235
"LAST_UPDATED_IN_DAYS": "Zuletzt Geändert (days)",
336
"CREATED_IN_DAYS": "Erstellt (days)",
437
"SCIM": "SCIM",
@@ -215,7 +248,7 @@
215248
"CREATION_DATE": "Erstellungsdatum",
216249
"NAME": "Name",
217250
"POVIDER_ID": "Anbieter ID",
218-
"UPDATE_GROUP_DETAILS": "Gruppen details aktualisieren",
251+
"UPDATE_GROUP_DETAILS": "Gruppen Details aktualisieren",
219252
"APPROVE_UNSAFE": "Genehmigen (unsicher)",
220253
"DISAPPROVE_UNSAFE": "Verweigern (sicher)",
221254
"SEND": "Senden",
@@ -245,6 +278,12 @@
245278
"OIDC": "OIDC",
246279
"DASHBOARD": "Dashboard",
247280
"USERS": "Benutzer",
281+
"CREATE_POLICY": "Richtlinien erstellen",
282+
"PRIORITY": "Priorität",
283+
"EDIT": "Bearbeiten",
284+
"POLICY": "Richtlinie",
285+
"POLICIES": "Richtlinien",
286+
"POLICY_LIST_INFO": "Diese Liste zeigt alle konfigurierten Richtlinien.",
248287
"SESSIONS": "Sessions",
249288
"MEMBERSHIPS": "Mitgliedschaften",
250289
"DUOS": "Duos",
@@ -264,7 +303,7 @@
264303
"SAVE": "Speichern",
265304
"REGISTRATION_DATE": "Registrierungs-Datum",
266305
"PUBLIC_KEY": "Öffentlicher Schlüssel",
267-
"UPDATE_USER_DETAILS": "Benutzer details aktualisieren",
306+
"UPDATE_USER_DETAILS": "Benutzer Details aktualisieren",
268307
"EDIT_USER": "Benutzer Bearbeiten",
269308
"SERVER_ASKS_FOR_YOUR_PLAINTEXT_PASSWORD": "Server frägt nach deinem Klartext-Passwort",
270309
"ACCEPTING_THIS_WILL_SEND_YOUR_PLAIN_PASSWORD": "Wenn sie die Anfrage genehmigen werden sie ihr Klartext-Passwort zum Server übermitteln. Sie sollten dies nur tun, wenn sie LDAP oder eine ähnliche Authentifizierungsmethode einsetzen. Sie können diese Anfrage abweisen was aber zu einem Authentifizierungsfehler führen kann.",

public/locales/en/translation.json

+39
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,37 @@
11
{
2+
"SETTINGS": "Settings",
3+
"OVERWRITE": "Overwrite",
4+
"VALUE": "Value",
5+
"POLICY_COMPLIANCE_DISABLE_API_KEYS": "Disable API Keys",
6+
"POLICY_COMPLIANCE_DISABLE_DELETE_ACCOUNT": "Disable delete account",
7+
"POLICY_COMPLIANCE_DISABLE_EMERGENCY_CODES": "Disable emergency codes",
8+
"POLICY_COMPLIANCE_DISABLE_EXPORT": "Disable export",
9+
"POLICY_COMPLIANCE_DISABLE_EXPORT_OF_SHARED_ITEMS": "Disable export of shared items",
10+
"POLICY_COMPLIANCE_DISABLE_FILE_REPOSITORIES": "Disable file repositories",
11+
"POLICY_COMPLIANCE_DISABLE_LINK_SHARES": "Disable link shares",
12+
"POLICY_COMPLIANCE_DISABLE_OFFLINE_MODE": "Disable offline mode",
13+
"POLICY_COMPLIANCE_DISABLE_SHARES": "Disable shares",
14+
"POLICY_COMPLIANCE_DISABLE_RECOVERY_CODES": "Disable recovery codes",
15+
"POLICY_COMPLIANCE_DISABLE_UNMANAGED_GROUPS": "Disable unmananged groups",
16+
"POLICY_COMPLIANCE_ENFORCE_2FA": "Enforce second factor",
17+
"POLICY_COMPLIANCE_ENFORCE_CENTRAL_SECURITY_REPORTS": "Enforce central security reports",
18+
"POLICY_DISABLE_CENTRAL_SECURITY_REPORTS": "Disable central security reports",
19+
"POLICY_DISABLE_CALLBACKS": "Disable callbacks",
20+
"POLICY_ALLOW_USER_SEARCH_BY_EMAIL": "Allow user search by email",
21+
"POLICY_ALLOW_USER_SEARCH_BY_USERNAME_PARTIAL": "Allow user search by partial username",
22+
"POLICY_COMPLIANCE_CENTRAL_SECURITY_REPORT_SECURITY_RECURRENCE_INTERVAL": "Recurrency interval in seconds for central security reports",
23+
"POLICY_COMPLIANCE_MAX_OFFLINE_CACHE_TIME_VALID": "Maximum age in seconds till last server connection of the offline cache",
24+
"POLICY_COMPLIANCE_PASSWORD_GENERATOR_DEFAULT_PASSWORD_LENGTH": "Passwordgenerator default setting for the length of passwords",
25+
"POLICY_COMPLIANCE_PASSWORD_GENERATOR_DEFAULT_LETTERS_UPPERCASE": "Passwordgenerator default setting for the uppercase letters",
26+
"POLICY_COMPLIANCE_PASSWORD_GENERATOR_DEFAULT_LETTERS_LOWERCASE": "Passwordgenerator default setting for the lowercase letters",
27+
"POLICY_COMPLIANCE_PASSWORD_GENERATOR_DEFAULT_NUMBERS": "Passwordgenerator default setting for the numbers",
28+
"POLICY_COMPLIANCE_PASSWORD_GENERATOR_DEFAULT_SPECIAL_CHARS": "Passwordgenerator default setting for the special characters",
29+
"POLICY_ALLOWED_FILE_REPOSITORY_TYPES": "Allowed file repository types",
30+
"POLICY_ALLOWED_SECOND_FACTORS": "Allowed second factors",
31+
"CONFIGURATION": "Configuration",
32+
"POLICY_DETAILS": "Policy Details",
33+
"EDIT_POLICY": "Edit policy",
34+
"UPDATE_POLICY_DETAILS": "Update the policy details",
235
"LAST_UPDATED_IN_DAYS": "Last Updated (days)",
336
"CREATED_IN_DAYS": "Created (days)",
437
"SCIM": "SCIM",
@@ -245,6 +278,12 @@
245278
"OIDC": "OIDC",
246279
"DASHBOARD": "Dashboard",
247280
"USERS": "Users",
281+
"CREATE_POLICY": "Create Policy",
282+
"PRIORITY": "Priority",
283+
"EDIT": "Edit",
284+
"POLICY": "Policy",
285+
"POLICIES": "Policies",
286+
"POLICY_LIST_INFO": "This list shows all configured policies.",
248287
"SESSIONS": "Sessions",
249288
"MEMBERSHIPS": "Memberships",
250289
"DUOS": "Duos",

src/components/Card/UsersCard.jsx

+9
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,15 @@ class UsersCard extends React.Component {
223223
<CustomMaterialTable
224224
tableRef={this.props.groupTableRef}
225225
columns={[
226+
{
227+
field: 'mapped',
228+
title: t('MAPPED'),
229+
customSort: (a, b) => {
230+
return (
231+
a.mapped_raw - b.mapped_raw
232+
);
233+
},
234+
},
226235
{ field: 'name', title: t('NAME') },
227236
{
228237
field: 'create_date',

src/containers/Index/Index.jsx src/containers/Index/Index.js

+12-3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import { Header, Footer, Sidebar, Notification } from '../../components';
1010

1111
import otherLinks from '../../routes/other';
1212
import sidebarLinks from '../../routes/sidebar';
13+
import eeLinks from '../../routes/ee';
1314
import ldapLinks from '../../routes/ldap';
1415
import samlLinks from '../../routes/saml';
1516
import oidcLinks from '../../routes/oidc';
@@ -56,25 +57,33 @@ class App extends React.Component {
5657
const { classes, ...rest } = this.props;
5758

5859
let variableLinks = [];
60+
if (this.props.state.server.type === 'EE') {
61+
eeLinks.forEach(function (link) {
62+
variableLinks.push(link);
63+
});
64+
}
5965
if (
66+
this.props.state.server.type === 'EE' &&
6067
this.props.state.server.authentication_methods.indexOf('LDAP') !==
61-
-1
68+
-1
6269
) {
6370
ldapLinks.forEach(function (link) {
6471
variableLinks.push(link);
6572
});
6673
}
6774
if (
75+
this.props.state.server.type === 'EE' &&
6876
this.props.state.server.authentication_methods.indexOf('SAML') !==
69-
-1
77+
-1
7078
) {
7179
samlLinks.forEach(function (link) {
7280
variableLinks.push(link);
7381
});
7482
}
7583
if (
84+
this.props.state.server.type === 'EE' &&
7685
this.props.state.server.authentication_methods.indexOf('OIDC') !==
77-
-1
86+
-1
7887
) {
7988
oidcLinks.forEach(function (link) {
8089
variableLinks.push(link);

src/containers/Index/SwitchRoutes.js

+86
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
import React from 'react';
2+
import { Switch, Route, Redirect, matchPath } from 'react-router-dom';
3+
import sidebarRoutes from '../../routes/sidebar';
4+
import eeRoutes from '../../routes/ee';
5+
import ldapRoutes from '../../routes/ldap';
6+
import samlRoutes from '../../routes/saml';
7+
import oidcRoutes from '../../routes/oidc';
8+
import otherRoutes from '../../routes/other';
9+
10+
const SwitchRoutes = (props) => {
11+
const { actions, state, store, ...rest } = props;
12+
13+
let variableLinks = [];
14+
if (state.server.type === 'EE') {
15+
eeRoutes.forEach(function (route) {
16+
variableLinks.push(route);
17+
});
18+
}
19+
if (
20+
state.server.type === 'EE' &&
21+
state.server.authentication_methods.indexOf('LDAP') !== -1
22+
) {
23+
ldapRoutes.forEach(function (route) {
24+
variableLinks.push(route);
25+
});
26+
}
27+
if (
28+
state.server.type === 'EE' &&
29+
state.server.authentication_methods.indexOf('SAML') !== -1
30+
) {
31+
samlRoutes.forEach(function (route) {
32+
variableLinks.push(route);
33+
});
34+
}
35+
if (
36+
state.server.type === 'EE' &&
37+
state.server.authentication_methods.indexOf('OIDC') !== -1
38+
) {
39+
oidcRoutes.forEach(function (route) {
40+
variableLinks.push(route);
41+
});
42+
}
43+
44+
const routes = otherRoutes.concat(variableLinks, sidebarRoutes);
45+
46+
let match = null;
47+
for (let i = 0; i < routes.length; i++) {
48+
match = matchPath(props.location.pathname, routes[i].path);
49+
if (match !== null) {
50+
break;
51+
}
52+
}
53+
54+
return (
55+
<Switch>
56+
{routes.map((prop, key) => {
57+
if (prop.redirect)
58+
return (
59+
<Redirect
60+
from={prop.path}
61+
to={prop.to}
62+
key={key}
63+
{...rest}
64+
/>
65+
);
66+
return (
67+
<Route
68+
path={prop.path}
69+
render={() => (
70+
<prop.component
71+
actions={actions}
72+
state={state}
73+
store={store}
74+
match={match}
75+
/>
76+
)}
77+
key={key}
78+
{...rest}
79+
/>
80+
);
81+
})}
82+
</Switch>
83+
);
84+
};
85+
86+
export default SwitchRoutes;

src/containers/Index/SwitchRoutes.jsx

-80
This file was deleted.

src/containers/Login/Login.jsx src/containers/Login/Login.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const style = {
2020
backgroundSize: 'cover',
2121
display: 'flex',
2222
'justify-content': 'center',
23-
'align-items': 'center'
23+
'align-items': 'center',
2424
},
2525
content: {
2626
width: '100%',
@@ -29,8 +29,8 @@ const style = {
2929
content: '',
3030
opacity: '.8',
3131
position: 'absolute',
32-
background: '#000'
33-
}
32+
background: '#000',
33+
},
3434
};
3535

3636
class Login extends React.Component {
@@ -67,7 +67,7 @@ class Login extends React.Component {
6767

6868
Login.propTypes = {
6969
store: PropTypes.object.isRequired,
70-
classes: PropTypes.object.isRequired
70+
classes: PropTypes.object.isRequired,
7171
};
7272

7373
function mapStateToProps(state) {

0 commit comments

Comments
 (0)