You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The locks functionality in Control/ECS GUI provides a mechanism to ensure exclusive access to detectors during operations. This prevents conflicts when multiple users attempt to configure or control the same detector simultaneously.
6
+
7
+
All LOCKs operations require an authenticated user session and moreover:
8
+
- Lock Operations require a role of minimum `Role.DETECTOR`.
9
+
- Lock Operations on `ALL` detectors require a minimum role of `Role.GLOBAL`.
10
+
- Forced Lock Operations require a role of minimum `Role.GLOBAL`.
11
+
- Forced Lock Operations on `ALL` detectors require a minimum role of `Role.ADMIN`.
12
+
13
+
## Lock Management
14
+
15
+
### Lock States
16
+
17
+
Each detector can be in one of the following lock states:
18
+
-**Released**: The detector is available to be locked by any user
19
+
-**Taken**: The detector is currently locked by a specific user
20
+
21
+
### Get Lock States
22
+
23
+
### Take Lock
24
+
25
+
Acquires a lock on a detector for the current user.
26
+
27
+
**Parameters**:
28
+
-`detectorId`: The individual detector identifier or `ALL` to lock all detectors (excluding TST)
29
+
-`action`: `TAKE`
30
+
-`shouldForce` (optional): Boolean flag to force taking the lock even if held by another user
31
+
32
+
**Behavior**:
33
+
- When `detectorId` is `ALL` and the user has a role of at least `GLOBAL`, locks all detectors **except** TST
34
+
- If a lock is already held by another user and:
35
+
-`shouldForce` is `false`, the request will fail.
36
+
-`shouldForce` is `true` and the user has a role of at least `GLOBAL` for individual detector and at least `ADMIN` for detector `ALL`, the lock will be taken regardless of current ownership
37
+
38
+
### Release Lock
39
+
40
+
Releases a lock on a detector.
41
+
42
+
**Parameters**:
43
+
-`detectorId`: The detector identifier or `ALL` to release all locks (excluding TST)
44
+
-`action`: `RELEASE`
45
+
-`shouldForce` (optional): Boolean flag to force releasing the lock even if held by another user
46
+
47
+
**Behavior**:
48
+
- When `detectorId` is `ALL` and the user has a role of at least `GLOBAL`, releases locks on all detectors **except** TST
49
+
- If a lock is already held by another user and:
50
+
-`shouldForce` is `false`, the request will fail.
51
+
-`shouldForce` is `true` and the user has a role of at least `GLOBAL` for individual detector and at least `ADMIN` for detector `ALL`, the lock will be released regardless of current ownership
52
+
53
+
## Special Cases
54
+
55
+
### TST Detector
56
+
57
+
The TST (test) detector is treated specially:
58
+
- When using `ALL` as the detector ID, TST is excluded from both TAKE and RELEASE operations
59
+
- TST must be taken/released explicitly by using `TST` as the detector ID
60
+
- Moreover, front-end pages are also:
61
+
- excluding TST from being displayed if on `Global` page
62
+
- displaying TST at the end with separator if on `+Create` or `Locks` pages
63
+
64
+
### Error Handling
65
+
66
+
The lock controller handles the following error cases:
0 commit comments