Commit b1d2758b authored by Jörg Richter's avatar Jörg Richter

Core API: rename `getAdministrationWorkspaceId()` (#310)

BREAKING CHANGE

1) Rename 1 `PrivilegedAccess` method:
```
getAdministrationWorkspaceId()
->
getAdminWorkspaceId()
```

2) Rename 6 `AccessControlService` constants:
```
ADMINISTRATION_WORKSPACE_NAME
ADMINISTRATION_WORKSPACE_URI
ADMINISTRATION_WORKSPACE_SHARING_MODE
->
ADMIN_WORKSPACE_NAME
ADMIN_WORKSPACE_URI
ADMIN_WORKSPACE_SHARING_MODE
```
parent 08bc15cc
Pipeline #10608 passed with stages
in 8 minutes and 25 seconds
......@@ -379,7 +379,7 @@ public class AccessControlPlugin extends PluginActivator implements AccessContro
@Path("/workspace/admin/id")
@Override
public long getAdminWorkspaceId() {
return dmx.getPrivilegedAccess().getAdministrationWorkspaceId();
return dmx.getPrivilegedAccess().getAdminWorkspaceId();
}
......
......@@ -20,9 +20,9 @@ public interface AccessControlService {
static final String ADMIN_INITIAL_PASSWORD = System.getProperty("dmx.security.initial_admin_password", "");
// Administration workspace
static final String ADMINISTRATION_WORKSPACE_NAME = "Administration";
static final String ADMINISTRATION_WORKSPACE_URI = "dmx.workspaces.administration";
static final SharingMode ADMINISTRATION_WORKSPACE_SHARING_MODE = SharingMode.COLLABORATIVE;
static final String ADMIN_WORKSPACE_NAME = "Administration";
static final String ADMIN_WORKSPACE_URI = "dmx.workspaces.administration";
static final SharingMode ADMIN_WORKSPACE_SHARING_MODE = SharingMode.COLLABORATIVE;
// System workspace
static final String SYSTEM_WORKSPACE_NAME = "System";
......
......@@ -48,9 +48,9 @@ public class Migration2 extends Migration {
//
// "Administration"
Topic adminWorkspace = wsService.createWorkspace(
AccessControlService.ADMINISTRATION_WORKSPACE_NAME,
AccessControlService.ADMINISTRATION_WORKSPACE_URI,
AccessControlService.ADMINISTRATION_WORKSPACE_SHARING_MODE
AccessControlService.ADMIN_WORKSPACE_NAME,
AccessControlService.ADMIN_WORKSPACE_URI,
AccessControlService.ADMIN_WORKSPACE_SHARING_MODE
);
acService.setWorkspaceOwner(adminWorkspace, AccessControlService.ADMIN_USERNAME);
//
......
......@@ -175,7 +175,7 @@ public class ConfigPlugin extends PluginActivator implements ConfigService, Post
PrivilegedAccess pa = dmx.getPrivilegedAccess();
switch (role) {
case ADMIN:
return pa.getAdministrationWorkspaceId();
return pa.getAdminWorkspaceId();
case SYSTEM:
return pa.getSystemWorkspaceId();
default:
......
......@@ -57,7 +57,7 @@ class PrivilegedAccessImpl implements PrivilegedAccess {
// ### TODO: copy in WorkspaceService.java
private static final String DMX_WORKSPACE_URI = "dmx.workspaces.dmx";
// ### TODO: copy in AccessControlService.java
private static final String ADMINISTRATION_WORKSPACE_URI = "dmx.workspaces.administration";
private static final String ADMIN_WORKSPACE_URI = "dmx.workspaces.administration";
private static final String SYSTEM_WORKSPACE_URI = "dmx.workspaces.system";
// ### TODO: copy in Credentials.java
......@@ -294,9 +294,9 @@ class PrivilegedAccessImpl implements PrivilegedAccess {
}
@Override
public long getAdministrationWorkspaceId() {
public long getAdminWorkspaceId() {
if (adminWorkspaceId == -1) {
adminWorkspaceId = _getWorkspace(ADMINISTRATION_WORKSPACE_URI).getId();
adminWorkspaceId = _getWorkspace(ADMIN_WORKSPACE_URI).getId();
}
return adminWorkspaceId;
}
......
......@@ -143,7 +143,7 @@ public interface PrivilegedAccess {
/**
* Returns the ID of the "Administration" workspace.
*/
long getAdministrationWorkspaceId();
long getAdminWorkspaceId();
/**
* Returns the ID of the "System" workspace.
......
......@@ -8,7 +8,7 @@
</div>
<div class="field">
<div class="field-label">Released</div>
Jul 22, 2020
Jul 25, 2020
</div>
<div class="field">
<div class="field-label">License</div>
......
......@@ -9,7 +9,7 @@ import extraElementUI from './element-ui'
import 'font-awesome/css/font-awesome.css'
import './websocket'
console.log('[DMX] 2020/07/22')
console.log('[DMX] 2020/07/25')
// 1) Init dm5 library
// The dm5 library must be inited *before* the dm5-webclient component is instantiated.
......
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