/* * Copyright 2007-2017 Charles du Jeu - Abstrium SAS * This file is part of Pydio. * * Pydio is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * Pydio 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with Pydio. If not, see . * * The latest code can be found at . */ const React = require('react') const {Paper, FlatButton, Divider} = require('material-ui'); const {User, UsersApi} = require('pydio/http/users-api') import Manager from '../manager/Manager' import FormPanel from './FormPanel' class UserCreationForm extends React.Component{ getCreateUserParameters(editMode = false){ let basicParameters = []; const pydio = this.props.pydio; const {MessageHash} = pydio; let prefix = pydio.getPluginConfigs('action.share').get('SHARED_USERS_TMP_PREFIX'); basicParameters.push({ description : MessageHash['533'], editable : false, expose : "true", label : MessageHash['522'], name : (editMode ? "existing_user_id" : "new_user_id"), scope : "user", type : (editMode ? "hidden" : "string"), mandatory : "true", "default" : prefix ? prefix : '' },{ description : MessageHash['534'], editable : "true", expose : "true", label : MessageHash['523'], name : "new_password", scope : "user", type : "valid-password", mandatory : "true" }); const params = global.pydio.getPluginConfigs('conf').get('NEWUSERS_EDIT_PARAMETERS').split(','); for(let i=0;i
) } } UserCreationForm.propTypes = { newUserName : React.PropTypes.string, onUserCreated : React.PropTypes.func.isRequired, onCancel : React.PropTypes.func.isRequired, onValidStatusChange : React.PropTypes.func, editMode : React.PropTypes.bool, userData : React.PropTypes.object }; export {UserCreationForm as default}