Commit 332a1691 authored by Sascha's avatar Sascha

Merge branch 'develop' into 'master'

Preparing v1.12.1

Closes #109, #114, and #45

See merge request !121
parents 2cbf3d7e ed07da25
......@@ -220,6 +220,21 @@
if (!new_config.hasOwnProperty('saml_provider')) {
new_config['saml_provider'] = [];
}
if (!new_config.hasOwnProperty('more_links')) {
new_config['more_links'] = [{
'href': 'https://doc.psono.com/',
'title': 'DOCUMENTATION',
'class': 'fa-book'
},{
'href': 'privacy-policy.html',
'title': 'PRIVACY_POLICY',
'class': 'fa-user-secret'
},{
'href': 'https://www.psono.com',
'title': 'ABOUT_US',
'class': 'fa-info-circle'
}];
}
return deferred.resolve(new_config);
};
......
......@@ -7,5 +7,18 @@
"allow_custom_server": true,
"allow_registration": true,
"allow_lost_password": true,
"authentication_methods": ["AUTHKEY", "LDAP"]
"authentication_methods": ["AUTHKEY", "LDAP"],
"more_links": [{
"href": "https://doc.psono.com/",
"title": "DOCUMENTATION",
"class": "fa-book"
},{
"href": "privacy-policy.html",
"title": "PRIVACY_POLICY",
"class": "fa-user-secret"
},{
"href": "https://www.psono.com",
"title": "ABOUT_US",
"class": "fa-info-circle"
}]
}
\ No newline at end of file
......@@ -136,7 +136,7 @@
<a ng-if="provider.registration_url" ng-href="{{ provider.registration_url }}">{{'REGISTER' | translate}}</a>
</div>
</div>
<p ng-if="saml_enabled && (authkey_enabled || ldap_enabled)" class="horizontalline"><span>{{'OR' | translate}}</span></p>
<p ng-if="saml_enabled && saml_provider && saml_provider.length && (authkey_enabled || ldap_enabled)" class="horizontalline"><span>{{'OR' | translate}}</span></p>
<div ng-if="authkey_enabled || ldap_enabled" ng-class="{'input-group': login_data.username == null || login_data.username.indexOf('@') == -1}">
<input type="text" class="form-control" id="loginUsername" placeholder="{{'USERNAME' | translate}}" ng-model="login_data.username" required aria-describedby="username-addon" autofocus>
<span class="input-group-addon" id="username-addon" ng-if="login_data.username == null || login_data.username.indexOf('@') == -1">@{{selected_server_domain}}</span>
......
......@@ -149,22 +149,12 @@
</a>
</li>
</ul>
<h2>{{'MORE' | translate}}</h2>
<ul class="navigations">
<!--<li><a href="https://www.psono.pw/help" target="_blank">Help</a></li>-->
<li>
<a class="navigationitem2" href="https://doc.psono.com/" target="_blank" rel="noopener">
<span class="fa-stack"><i class="fa fa-book fa-fw" aria-hidden="true"></i></span>{{'DOCUMENTATION' | translate}}
</a>
</li>
<li>
<a class="navigationitem2" href="privacy-policy.html" target="_blank" rel="noopener">
<span class="fa-stack"><i class="fa fa-user-secret fa-fw" aria-hidden="true"></i></span>{{'PRIVACY_POLICY' | translate}}
</a>
</li>
<li>
<a class="navigationitem2" href="https://www.psono.com" target="_blank" rel="noopener">
<span class="fa-stack"><i class="fa fa-info-circle fa-fw" aria-hidden="true"></i></span>{{'ABOUT_US' | translate}}
<h2 ng-if="more_links && more_links.length">{{'MORE' | translate}}</h2>
<ul class="navigations" ng-if="more_links">
<li ng-repeat="l in more_links">
<a class="navigationitem2" ng-href="{{ l.href }}" target="_blank" rel="noopener">
<span class="fa-stack"><i class="fa fa-fw" ng-class="l.class" aria-hidden="true"></i></span>{{l.title | translate}}
</a>
</li>
</ul>
......@@ -215,7 +205,7 @@
<a ng-if="provider.registration_url" ng-href="{{ provider.registration_url }}">{{'REGISTER' | translate}}</a>
</div>
</div>
<p ng-if="saml_enabled && (authkey_enabled || ldap_enabled)" class="horizontalline"><span>{{'OR' | translate}}</span></p>
<p ng-if="saml_enabled && saml_provider && saml_provider.length && (authkey_enabled || ldap_enabled)" class="horizontalline"><span>{{'OR' | translate}}</span></p>
<div ng-if="authkey_enabled || ldap_enabled" ng-class="{'input-group': login_data.username == null || login_data.username.indexOf('@') == -1}">
<input type="text" class="form-control" id="loginUsername" placeholder="{{'USERNAME' | translate}}" ng-model="login_data.username" required aria-describedby="username-addon" autofocus>
<span class="input-group-addon" id="username-addon" ng-if="login_data.username == null || login_data.username.indexOf('@') == -1">@{{selected_server_domain}}</span>
......
......@@ -183,6 +183,12 @@
},
description: function () {
return 'LEAVE_GROUP_WARNING';
},
entries: function () {
return [group.name];
},
affected_entries_text: function () {
return 'AFFECTED_GROUPS';
}
}
});
......@@ -216,19 +222,27 @@
* @description
* Deletes a given group
*
* @param {uuid} group_id The id of the group to delete
* @param {object} group The group to delete
*/
function delete_group(group_id) {
function delete_group(group) {
var group_id = group['group_id'];
var modalInstance = $uibModal.open({
templateUrl: 'view/modal/verify.html',
controller: 'ModalVerifyCtrl',
resolve: {
title: function () {
return 'Delete Group';
return 'DELETE_GROUP';
},
description: function () {
return 'You are about to delete the group. All shares will be lost / become inaccessible. Are you sure?';
return 'DELETE_GROUP_WARNING';
},
entries: function () {
return [group.name];
},
affected_entries_text: function () {
return 'AFFECTED_GROUPS';
}
}
});
......@@ -443,7 +457,7 @@
* @description
* Declines a given membership request
*
* @param {uuid} group The group to decline
* @param {object} group The group to decline
*/
function decline_group(group) {
......
......@@ -75,8 +75,15 @@
$scope.offline = false;
});
browserClient.load_config().then(function (config) {
$scope.more_links = config['more_links'];
});
managerStatus.get_status().then(function(status) {
if (typeof(status) === 'undefined') {
return;
}
$scope.server_status.data = status.data;
});
......
......@@ -139,6 +139,12 @@
},
description: function () {
return 'DELETE_API_KEY_WARNING';
},
entries: function () {
return [api_key.title];
},
affected_entries_text: function () {
return 'AFFECTED_API_KEYS';
}
}
});
......
......@@ -142,6 +142,12 @@
},
description: function () {
return 'DELETE_FILE_REPOSITORY_WARNING';
},
entries: function () {
return [file_repository.title];
},
affected_entries_text: function () {
return 'AFFECTED_FILE_REPOSITORIES';
}
}
});
......@@ -229,6 +235,12 @@
},
description: function () {
return 'DELETE_FILE_REPOSITORY_RIGHT_WARNING';
},
entries: function () {
return [file_repository.title];
},
affected_entries_text: function () {
return 'AFFECTED_FILE_REPOSITORIES';
}
}
});
......
......@@ -10,14 +10,16 @@
* @description
* Controller for the "delete verification" modal
*/
angular.module('psonocli').controller('ModalVerifyCtrl', ['$scope', '$uibModalInstance', 'title', 'description',
function ($scope, $uibModalInstance, title, description) {
angular.module('psonocli').controller('ModalVerifyCtrl', ['$scope', '$uibModalInstance', 'title', 'description', 'entries', 'affected_entries_text',
function ($scope, $uibModalInstance, title, description, entries, affected_entries_text) {
$scope.confirm = confirm;
$scope.cancel = cancel;
$scope.title = title;
$scope.description = description;
$scope.entries = entries;
$scope.affected_entries_text = affected_entries_text;
/**
* @ngdoc
......
......@@ -247,6 +247,12 @@
},
description: function () {
return 'DELETE_FOLDER_WARNING';
},
entries: function () {
return [node.name];
},
affected_entries_text: function () {
return 'AFFECTED_FOLDERS';
}
}
});
......@@ -363,6 +369,12 @@
},
description: function () {
return 'DELETE_ENTRY_WARNING';
},
entries: function () {
return [item.name];
},
affected_entries_text: function () {
return 'AFFECTED_ENTRIES';
}
}
});
......
......@@ -223,7 +223,10 @@
}
// load delete account last
_tabs.push({ key: 'delete-account', title: 'DELETE_ACCOUNT', description: 'DELETE_ACCOUNT_DESCRIPTION' });
if (!server_info.value.hasOwnProperty('compliance_disable_delete_account') || server_info.value['compliance_disable_delete_account'] === false) {
_tabs.push({ key: 'delete-account', title: 'DELETE_ACCOUNT', description: 'DELETE_ACCOUNT_DESCRIPTION' });
}
_tabs_already_loaded = true;
}
......
......@@ -200,6 +200,21 @@
if (!new_config.hasOwnProperty('saml_provider')) {
new_config['saml_provider'] = [];
}
if (!new_config.hasOwnProperty('more_links')) {
new_config['more_links'] = [{
'href': 'https://doc.psono.com/',
'title': 'DOCUMENTATION',
'class': 'fa-book'
},{
'href': 'privacy-policy.html',
'title': 'PRIVACY_POLICY',
'class': 'fa-user-secret'
},{
'href': 'https://www.psono.com',
'title': 'ABOUT_US',
'class': 'fa-info-circle'
}];
}
return $q.resolve(new_config);
};
......
......@@ -358,11 +358,11 @@
var USERNAME_REGEXP = /^[a-z0-9.\-]*$/i;
var error;
if( ! USERNAME_REGEXP.test(username)) {
return 'Usernames may only contain letters, numbers, periods and dashes';
return 'USERNAME_VALIDATION_NAME_CONTAINS_INVALID_CHARS';
}
if (username.length < 3) {
return 'Usernames may not be shorter than 3 chars';
if (username.length < 2) {
return 'USERNAME_VALIDATION_NAME_TOO_SHORT';
}
error = validate_username_start(username, [".", "-"]);
......
......@@ -86,7 +86,7 @@
<a ng-if="provider.registration_url" ng-href="{{ provider.registration_url }}">{{'REGISTER' | translate}}</a>
</div>
</div>
<p ng-if="saml_enabled && (authkey_enabled || ldap_enabled)" class="horizontalline"><span>{{'OR' | translate}}</span></p>
<p ng-if="saml_enabled && saml_provider && saml_provider.length && (authkey_enabled || ldap_enabled)" class="horizontalline"><span>{{'OR' | translate}}</span></p>
<div ng-if="authkey_enabled || ldap_enabled" ng-class="{'input-group': login_data.username == null || login_data.username.indexOf('@') == -1}">
<input type="text" class="form-control" id="loginUsername" placeholder="{{'USERNAME' | translate}}" ng-model="login_data.username" required aria-describedby="username-addon" autofocus>
<span class="input-group-addon" id="username-addon" ng-if="login_data.username == null || login_data.username.indexOf('@') == -1">@{{selected_server_domain}}</span>
......
{
"ACCOUNT_DELETION_DISABLED": "Useraccounts cannot be deleted on this server",
"PASSWORD_INCORRECT": "Password incorrect",
"USERNAME_VALIDATION_NAME_CONTAINS_INVALID_CHARS": "Benutzernamen dürfen nur Buchstaben, Zahlen, Bindestriche und Punkte enthalten",
"USERNAME_VALIDATION_NAME_TOO_SHORT": "Benutzername zu kurz",
"DELETE_GROUP": "Gruppe löschen",
"DELETE_GROUP_WARNING": "Sie sind dabei diese Grupep zu lösschen. Alle Shares der Gruppe gehen dabei verloren oder werden unzugänglich. Sind sie sicher?",
"AFFECTED_GROUPS": "Betroffene Gruppen",
"AFFECTED_FILE_REPOSITORIES": "Betroffene Daten Repositories",
"AFFECTED_API_KEYS": "Betroffene API Schlüssel",
"AFFECTED_FOLDERS": "Betroffene Ordner",
"AFFECTED_ENTRIES": "Betroffene Einträge",
"USER_NOT_PART_OF_REQUIRED_GROUP": "Ihr Nutzerkonto ist nicht in einer der dafür berechtigten Gruppen",
"NO_SAML_TOKEN_ID_PROVIDED": "Keine SAML token ID angegeben.",
"LOGIN_INFO_CANNOT_BE_DECRYPTED": "Login Informationen konnten vom Server nicht entschlüsselt werden.",
......
{
"ACCOUNT_DELETION_DISABLED": "Benutzerkonten können auf diesem Server nicht gelöscht werden",
"PASSWORD_INCORRECT": "Password falsch",
"USERNAME_VALIDATION_NAME_CONTAINS_INVALID_CHARS": "Usernames may only contain letters, numbers, periods and dashes",
"USERNAME_VALIDATION_NAME_TOO_SHORT": "Username too short",
"DELETE_GROUP": "Delete Group",
"DELETE_GROUP_WARNING": "You are about to delete the group. All shares will be lost / become inaccessible. Are you sure?",
"AFFECTED_GROUPS": "Affected groups",
"AFFECTED_FILE_REPOSITORIES": "Affected file repositories",
"AFFECTED_API_KEYS": "Affected API keys",
"AFFECTED_FOLDERS": "Affected folders",
"AFFECTED_ENTRIES": "Affected entries",
"USER_NOT_PART_OF_REQUIRED_GROUP": "Your account is not part of one of the authorized groups.",
"NO_SAML_TOKEN_ID_PROVIDED": "No SAML token id provided.",
"LOGIN_INFO_CANNOT_BE_DECRYPTED": "Login information could not be decrypted by the server.",
......@@ -76,14 +87,14 @@
"API_KEY_DETAILS": "API Key Details",
"API_KEY_DETAIL_EXPLANATION": "Here are all the parameters of the API key.",
"DELETE_ENTRY_WARNING": "You are about to delete this entry. Are you sure?",
"DELETE_FOLDER_WARNING": "You are about to delete the folder and all it's content. Are you sure?",
"DELETE_FOLDER_WARNING": "You are about to delete the folder and all its content. Are you sure?",
"CHOOSE_SECRET": "Choose secret",
"ADD_SECRET_TO_API_KEY": "Add secret to API key",
"DELETE_API_KEY": "Delete API Key",
"DELETE_API_KEY_WARNING": "You are about to delete an API key. All people and applications using this API key will lose access. Are you sure?",
"LEAVE_GROUP": "Leave Group",
"LEAVE_GROUP_WARNING": "You are about to leave the group. You will lose access to shares that belong to the group. Are you sure?",
"API_KEY_INSECURE_USAGE_WARNING": "You are about to allow this key to use an as insecure rated methods. With this its possible to access secrets without the complexity of the additional transport encryption or the need to decrypt passwords locally. You should only allow this if you cannot use the official console client and have to use simpler clients (e.g. curl).",
"API_KEY_INSECURE_USAGE_WARNING": "You are about to allow this key to use an as insecure rated methods. With this, it's possible to access secrets without the complexity of the additional transport encryption or the need to decrypt passwords locally. You should only allow this if you cannot use the official console client and have to use simpler clients (e.g. curl).",
"API_KEY_NOT_RESTRICTED_TO_SECRETS_WARNING": "You removed the restriction for specific secrets. As a consequence this API key will have complete access to your account.",
"EDIT_API_KEY": "Edit API Key",
"SECRETS": "Secrets",
......@@ -312,7 +323,7 @@
"EMAIL_IS_REQUIRED": "The e-mail is required",
"YOUR_REQUIRED_NAME": "Your name (required)",
"YOUR_REQUIRED_EMAIL": "Your email address (required)",
"YOUR_KEYS_PASSPHRASE": "Your key's passphrase (if its password protected)",
"YOUR_KEYS_PASSPHRASE": "Your key's passphrase (if it's password protected)",
"TITLE_TO_IDENTIFY_THIS_KEY": "Title to identify this key (required)",
"IMPORT_GPG_KEY": "Import GPG Key",
"SET_LONGER_PASSWORD": "Set longer password (length <= {{ min_password_length }})",
......
......@@ -66,7 +66,7 @@
</button>
</td>
<td>
<button type="button" class="btn btn-default btn-sm" ng-click="delete_group(group.group_id)"
<button type="button" class="btn btn-default btn-sm" ng-click="delete_group(group)"
ng-disabled="!group.group_admin || (group.accepted !== false && group.accepted !== true)" >
<i class="fa fa-trash" aria-hidden="true"><span style="display: none">0</span></i>
</button>
......
......@@ -5,6 +5,13 @@
</div>
<div class="modal-body">
<div class="form-group" ng-if="entries">
<strong>{{ affected_entries_text | translate}}:</strong>
<ul style="margin-top:10px">
<li ng-repeat="entry in entries">{{ entry }}</li>
</ul>
</div>
<div class="form-group alert alert-danger">
<strong>{{'DANGER' | translate}}!</strong> {{ description | translate }}
</div>
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -215,6 +215,21 @@
if (!new_config.hasOwnProperty('saml_provider')) {
new_config['saml_provider'] = [];
}
if (!new_config.hasOwnProperty('more_links')) {
new_config['more_links'] = [{
'href': 'https://doc.psono.com/',
'title': 'DOCUMENTATION',
'class': 'fa-book'
},{
'href': 'privacy-policy.html',
'title': 'PRIVACY_POLICY',
'class': 'fa-user-secret'
},{
'href': 'https://www.psono.com',
'title': 'ABOUT_US',
'class': 'fa-info-circle'
}];
}
return deferred.resolve(new_config);
};
......
......@@ -144,11 +144,11 @@
}));
it('is_valid_username not allowed chars', inject(function (helper) {
expect(helper.is_valid_username('ab@cd') === true).toBeFalsy();
expect(helper.is_valid_username('ab%cd') === true).toBeFalsy();
}));
it('is_valid_username too small', inject(function (helper) {
expect(helper.is_valid_username('ab') === true).toBeFalsy();
expect(helper.is_valid_username('a') === true).toBeFalsy();
}));
it('is_valid_username start with .', inject(function (helper) {
......
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