промежуточный. проход редактирования учетной записи админом
This commit is contained in:
@@ -345,6 +345,10 @@ public class ComponentsServer extends RepositoryServer<BugReportsDatabase> {
|
||||
void ReceiveCredentialsDatabase() throws Exception{
|
||||
response.object = Utils_.fileToBytes(credentials_db.getFile());
|
||||
}
|
||||
void EditUserAccount() throws Exception{
|
||||
UserAccount new_object = (UserAccount) request.object;
|
||||
credentials_db.UpdateWithCheck(new_object);
|
||||
}
|
||||
//--
|
||||
@Override
|
||||
protected void UnsafeSession() throws Exception {
|
||||
@@ -381,6 +385,9 @@ public class ComponentsServer extends RepositoryServer<BugReportsDatabase> {
|
||||
@Override
|
||||
protected void Session() throws Exception {
|
||||
switch (code) {
|
||||
case EditUserAccount:
|
||||
EditUserAccount();
|
||||
break;
|
||||
case ReceiveCredentialsDatabase:
|
||||
ReceiveCredentialsDatabase();
|
||||
break;
|
||||
|
||||
@@ -2,6 +2,7 @@ package _VisualDVM.ComponentsServer;
|
||||
import Common.Database.SQLITE.SQLiteDatabase;
|
||||
import Common.Passes.PassCode_;
|
||||
import _VisualDVM.ComponentsServer.UserAccount.UserAccountsDBTable;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
|
||||
import java.nio.file.Paths;
|
||||
public class CredentialsDatabase extends SQLiteDatabase {
|
||||
@@ -15,7 +16,7 @@ public class CredentialsDatabase extends SQLiteDatabase {
|
||||
}
|
||||
@Override
|
||||
public PassCode_ getSynchronizePassCode() {
|
||||
return null;
|
||||
return PassCode.SynchronizeCredentials;
|
||||
}
|
||||
@Override
|
||||
public void DropUI() {
|
||||
|
||||
@@ -3,6 +3,7 @@ import Common.Database.Tables.DataSet;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import Common.Visual.Menus.DataMenuBar;
|
||||
import Common.Visual.Tables.ColumnInfo;
|
||||
import Common.Visual.Windows.Dialog.DBObjectDialog;
|
||||
import _VisualDVM.ComponentsServer.Subscribes.Subscriber;
|
||||
import _VisualDVM.ComponentsServer.UserAccount.AccountRole;
|
||||
import _VisualDVM.ComponentsServer.UserAccount.UserAccount;
|
||||
@@ -49,6 +50,10 @@ public class UserAccountsForm extends DataSetControlForm<UserAccount> {
|
||||
}
|
||||
@Override
|
||||
protected DataMenuBar createMenuBar() {
|
||||
return new DataMenuBar(dataSource.getPluralDescription(), PassCode.SynchronizeCredentials);
|
||||
return new DataMenuBar(dataSource.getPluralDescription(), PassCode.SynchronizeCredentials, PassCode.EditUserAccount);
|
||||
}
|
||||
@Override
|
||||
protected DBObjectDialog getDialog() {
|
||||
return new UserAccountDialog();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user