Abänderung für Gruppenerstellung
This commit is contained in:
parent
55fa5952a2
commit
1866ec1c5a
10
Makefile
10
Makefile
|
|
@ -13,6 +13,16 @@ version+=master
|
|||
|
||||
all: appstore
|
||||
|
||||
# Building
|
||||
build-js:
|
||||
npm run dev
|
||||
|
||||
build-js-production:
|
||||
npm run build
|
||||
|
||||
watch-js:
|
||||
npm run watch
|
||||
|
||||
release: appstore create-tag
|
||||
|
||||
create-tag:
|
||||
|
|
|
|||
|
|
@ -1,2 +1,32 @@
|
|||
!function(){"use strict";document.addEventListener("DOMContentLoaded",(function(){var a=this;$("#showadminpass").click((function(t){t.preventDefault();var a=$("#password");"password"===a.attr("type")?a.attr("type","text"):a.attr("type","password")})),$("form").submit((function(){$(a).find(":submit").attr("disabled","disabled"),$(a).find(":submit")[0].value=t("registration","Loading …")}))}))}();
|
||||
//# sourceMappingURL=registration-form.js.map?v=2f99bd8b8e2f96df0fe1
|
||||
/******/ (function() { // webpackBootstrap
|
||||
/******/ "use strict";
|
||||
var __webpack_exports__ = {};
|
||||
/*!*********************!*\
|
||||
!*** ./src/form.js ***!
|
||||
\*********************/
|
||||
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
var _this = this;
|
||||
|
||||
// Password toggle
|
||||
$('#showadminpass').click(function (e) {
|
||||
e.preventDefault();
|
||||
var passwordTextField = $('#password');
|
||||
|
||||
if (passwordTextField.attr('type') === 'password') {
|
||||
passwordTextField.attr('type', 'text');
|
||||
} else {
|
||||
passwordTextField.attr('type', 'password');
|
||||
}
|
||||
}); // Disable submit after first click
|
||||
|
||||
$('form').submit(function () {
|
||||
// prevent duplicate form submissions
|
||||
$(_this).find(':submit').attr('disabled', 'disabled');
|
||||
$(_this).find(':submit')[0].value = t('registration', 'Loading …');
|
||||
});
|
||||
});
|
||||
/******/ })()
|
||||
;
|
||||
//# sourceMappingURL=registration-form.js.map?v=f64a2674d0a4e7f46973
|
||||
|
|
@ -1 +1 @@
|
|||
{"version":3,"sources":["webpack://registration/./src/form.js"],"names":["document","addEventListener","$","click","e","preventDefault","passwordTextField","attr","submit","find","value","t"],"mappings":"yBAAAA,SAASC,iBAAiB,oBAAoB,WAAW,WAExDC,EAAE,kBAAkBC,OAAM,SAACC,GAC1BA,EAAEC,iBACF,IAAMC,EAAoBJ,EAAE,aACW,aAAnCI,EAAkBC,KAAK,QAC1BD,EAAkBC,KAAK,OAAQ,QAE/BD,EAAkBC,KAAK,OAAQ,eAKjCL,EAAE,QAAQM,QAAO,WAEhBN,EAAE,GAAMO,KAAK,WAAWF,KAAK,WAAY,YACzCL,EAAE,GAAMO,KAAK,WAAW,GAAGC,MAAQC,EAAE,eAAgB,mB","file":"registration-form.js?v=2f99bd8b8e2f96df0fe1","sourcesContent":["document.addEventListener('DOMContentLoaded', function() {\n\t// Password toggle\n\t$('#showadminpass').click((e) => {\n\t\te.preventDefault()\n\t\tconst passwordTextField = $('#password')\n\t\tif (passwordTextField.attr('type') === 'password') {\n\t\t\tpasswordTextField.attr('type', 'text')\n\t\t} else {\n\t\t\tpasswordTextField.attr('type', 'password')\n\t\t}\n\t})\n\n\t// Disable submit after first click\n\t$('form').submit(() => {\n\t\t// prevent duplicate form submissions\n\t\t$(this).find(':submit').attr('disabled', 'disabled')\n\t\t$(this).find(':submit')[0].value = t('registration', 'Loading …')\n\t})\n})\n"],"sourceRoot":""}
|
||||
{"version":3,"file":"registration-form.js?v=f64a2674d0a4e7f46973","sources":["webpack://registration/./src/form.js"],"sourcesContent":["\"use strict\";\n\ndocument.addEventListener('DOMContentLoaded', function () {\n var _this = this;\n\n // Password toggle\n $('#showadminpass').click(function (e) {\n e.preventDefault();\n var passwordTextField = $('#password');\n\n if (passwordTextField.attr('type') === 'password') {\n passwordTextField.attr('type', 'text');\n } else {\n passwordTextField.attr('type', 'password');\n }\n }); // Disable submit after first click\n\n $('form').submit(function () {\n // prevent duplicate form submissions\n $(_this).find(':submit').attr('disabled', 'disabled');\n $(_this).find(':submit')[0].value = t('registration', 'Loading …');\n });\n});"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;A","sourceRoot":""}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -37,7 +37,7 @@ OC.L10N.register(
|
|||
"Registration app auto setup" : "Automatische Einrichtung der Registrierungs-App",
|
||||
"This app allows users to self-register a new account using their email address." : "Mit dieser App können Benutzer selbst ein neues Konto mithilfe ihrer E-Mail-Adresse erstellen.",
|
||||
"User registration\n\nThis app allows users to register a new account.\n\n# Features\n\n- Add users to a given group\n- Allow-list with email domains (including wildcard) to register with\n- Admins will be notified via email for new user creation or require approval\n- Supports Nextcloud's Client Login Flow v1 and v2 - allowing registration in the mobile Apps and Desktop clients\n\n# Web form registration flow\n\n1. User enters their email address\n2. Verification link is sent to the email address\n3. User clicks on the verification link\n4. User is lead to a form where they can choose their username and password\n5. New account is created and is logged in automatically" : "Benutzer-Registrierung\n\nDiese App ermöglicht es Benutzern, ein neues Konto zu registrieren.\n\n# Funktionen\n\n- Benutzer zu einer bestimmten Gruppe hinzufügen\n- Erlauben-Liste mit E-Mail-Domains (einschließlich Wildcard) zur Registrierung\n- Admins werden per E-Mail benachrichtigt, wenn ein neuer Benutzer angelegt wird oder eine Genehmigung erforderlich ist.\n- Unterstützt Nextcloud's Client Login Flow v1 und v2 - Ermöglicht die Registrierung in den mobilen Apps und Desktop-Clients\n\n# Ablauf der Webformular-Registrierung\n\n1. Benutzer gibt seine E-Mail-Adresse ein\n2. Der Verifizierungslink wird an die E-Mail-Adresse\n3. Benutzer klickt auf den Verifizierungslink\n4. Der Benutzer wird zu einem Formular geführt, in dem er seinen Benutzernamen und sein Passwort wählen kann.\n5. Neues Konto wird erstellt und automatisch eingeloggt",
|
||||
"Registration settings" : "Registrierungseinstellungen",
|
||||
"Registration settings" : "Registrierung Einstellungen",
|
||||
"Require admin approval" : "Genehmigung durch Administrator erforderlich",
|
||||
"Enabling \"admin approval\" will prevent registrations from mobile and desktop clients to complete as the credentials cannot be verified by the client until the user was enabled." : "Die Aktivierung von \"Genehmigung durch Administrator\" verhindert, dass Registrierungen von mobilen und Desktop-Clients abgeschlossen werden können, da die Anmeldedaten vom Client nicht überprüft werden können, bevor der Benutzer aktiviert wurde.",
|
||||
"Registered users default group" : "Standardgruppe für registrierte Benutzer",
|
||||
|
|
|
|||
|
|
@ -403,8 +403,10 @@ class RegistrationService {
|
|||
);
|
||||
$this->accountManager->updateAccount($account);
|
||||
}
|
||||
|
||||
$groupId = '';
|
||||
// Add user to group
|
||||
// This is not necessary for DA - here we want to create a new group for a new Agency!
|
||||
/*
|
||||
$registeredUserGroup = $this->config->getAppValue($this->appName, 'registered_user_group', 'none');
|
||||
if ($registeredUserGroup !== 'none') {
|
||||
$group = $this->groupManager->get($registeredUserGroup);
|
||||
|
|
@ -420,6 +422,24 @@ class RegistrationService {
|
|||
} else {
|
||||
$groupId = '';
|
||||
}
|
||||
*/
|
||||
// Create a new Group for the Agency and adding the new user
|
||||
$newgid = "agency_";
|
||||
$newgid_counter = 1;
|
||||
$groupidfree = false;
|
||||
while($groupidfree == false){
|
||||
// Find the next free Agency-ID
|
||||
if($this->groupManager->groupExists($newgid.$newgid_counter) == true){
|
||||
$newgid_counter += 1;
|
||||
}
|
||||
else{
|
||||
$groupidfree = true;
|
||||
}
|
||||
}
|
||||
|
||||
$newgroup = $this->groupManager->createGroup($newgid.$newgid_counter);
|
||||
$newgroup->addUser($user);
|
||||
|
||||
|
||||
// disable user if this is requested by config
|
||||
$adminApprovalRequired = $this->config->getAppValue($this->appName, 'admin_approval_required', 'no');
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -22,7 +22,7 @@
|
|||
<template>
|
||||
<div id="registration_settings_form">
|
||||
<SettingsSection
|
||||
:title="Registrierung Einstellungen">
|
||||
:title="t('registration', 'Registration settings')">
|
||||
<p>
|
||||
<input id="admin_approval"
|
||||
v-model="adminApproval"
|
||||
|
|
|
|||
Loading…
Reference in New Issue