Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-server
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
caosdb-server
Commits
09f53f64
Verified
Commit
09f53f64
authored
4 years ago
by
Timm Fitschen
Browse files
Options
Downloads
Patches
Plain Diff
WIP: state change permissions
parent
d0f5981a
No related branches found
No related tags found
3 merge requests
!21
Release v0.4.0
,
!7
F fsm
,
!6
Draft: F acm permissions2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/java/org/caosdb/server/permissions/EntityACL.java
+3
-1
3 additions, 1 deletion
src/main/java/org/caosdb/server/permissions/EntityACL.java
src/main/java/org/caosdb/server/transaction/Update.java
+3
-1
3 additions, 1 deletion
src/main/java/org/caosdb/server/transaction/Update.java
with
6 additions
and
2 deletions
src/main/java/org/caosdb/server/permissions/EntityACL.java
+
3
−
1
View file @
09f53f64
...
@@ -253,7 +253,9 @@ public class EntityACL {
...
@@ -253,7 +253,9 @@ public class EntityACL {
public
final
Element
toElement
()
{
public
final
Element
toElement
()
{
final
Element
ret
=
new
Element
(
"EntityACL"
);
final
Element
ret
=
new
Element
(
"EntityACL"
);
for
(
final
EntityACI
aci
:
this
.
acl
)
{
final
List
<
EntityACI
>
localAcl
=
new
ArrayList
<>(
this
.
acl
);
localAcl
.
addAll
(
GLOBAL_PERMISSIONS
.
acl
);
for
(
final
EntityACI
aci
:
localAcl
)
{
final
boolean
isDenial
=
isDenial
(
aci
.
getBitSet
());
final
boolean
isDenial
=
isDenial
(
aci
.
getBitSet
());
final
boolean
isPriority
=
isPriorityBitSet
(
aci
.
getBitSet
());
final
boolean
isPriority
=
isPriorityBitSet
(
aci
.
getBitSet
());
final
Element
e
=
new
Element
(
isDenial
?
"Deny"
:
"Grant"
);
final
Element
e
=
new
Element
(
isDenial
?
"Deny"
:
"Grant"
);
...
...
This diff is collapsed.
Click to expand it.
src/main/java/org/caosdb/server/transaction/Update.java
+
3
−
1
View file @
09f53f64
...
@@ -40,6 +40,7 @@ import org.caosdb.server.entity.FileProperties;
...
@@ -40,6 +40,7 @@ import org.caosdb.server.entity.FileProperties;
import
org.caosdb.server.entity.RetrieveEntity
;
import
org.caosdb.server.entity.RetrieveEntity
;
import
org.caosdb.server.entity.container.TransactionContainer
;
import
org.caosdb.server.entity.container.TransactionContainer
;
import
org.caosdb.server.entity.container.UpdateContainer
;
import
org.caosdb.server.entity.container.UpdateContainer
;
import
org.caosdb.server.entity.wrapper.EntityWrapper
;
import
org.caosdb.server.entity.wrapper.Parent
;
import
org.caosdb.server.entity.wrapper.Parent
;
import
org.caosdb.server.entity.wrapper.Property
;
import
org.caosdb.server.entity.wrapper.Property
;
import
org.caosdb.server.permissions.EntityPermission
;
import
org.caosdb.server.permissions.EntityPermission
;
...
@@ -239,7 +240,8 @@ public class Update extends WriteTransaction<UpdateContainer> {
...
@@ -239,7 +240,8 @@ public class Update extends WriteTransaction<UpdateContainer> {
}
}
// entity role
// entity role
if
(
newEntity
.
hasRole
()
if
(!(
newEntity
instanceof
EntityWrapper
)
&&
newEntity
.
hasRole
()
&&
oldEntity
.
hasRole
()
&&
oldEntity
.
hasRole
()
&&
!
newEntity
.
getRole
().
equals
(
oldEntity
.
getRole
())
&&
!
newEntity
.
getRole
().
equals
(
oldEntity
.
getRole
())
||
newEntity
.
hasRole
()
^
oldEntity
.
hasRole
())
{
||
newEntity
.
hasRole
()
^
oldEntity
.
hasRole
())
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment