Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openbis
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sispub
openbis
Commits
5207fdbb
Commit
5207fdbb
authored
12 years ago
by
gpawel
Browse files
Options
Downloads
Patches
Plain Diff
bugfix: fixing authorization predicate
SVN: 27075
parent
c4c5f9ea
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
openbis/source/java/ch/systemsx/cisd/openbis/generic/server/authorization/predicate/MetaprojectPredicate.java
+8
-21
8 additions, 21 deletions
.../server/authorization/predicate/MetaprojectPredicate.java
with
8 additions
and
21 deletions
openbis/source/java/ch/systemsx/cisd/openbis/generic/server/authorization/predicate/MetaprojectPredicate.java
+
8
−
21
View file @
5207fdbb
...
@@ -16,41 +16,28 @@
...
@@ -16,41 +16,28 @@
package
ch.systemsx.cisd.openbis.generic.server.authorization.predicate
;
package
ch.systemsx.cisd.openbis.generic.server.authorization.predicate
;
import
java.util.List
;
import
ch.systemsx.cisd.openbis.generic.shared.basic.TechId
;
import
ch.systemsx.cisd.common.exception.Status
;
import
ch.systemsx.cisd.openbis.generic.server.authorization.IAuthorizationDataProvider
;
import
ch.systemsx.cisd.openbis.generic.server.authorization.RoleWithIdentifier
;
import
ch.systemsx.cisd.openbis.generic.shared.basic.dto.Metaproject
;
import
ch.systemsx.cisd.openbis.generic.shared.basic.dto.Metaproject
;
import
ch.systemsx.cisd.openbis.generic.shared.dto.PersonPE
;
/**
/**
* @author Pawel Glyzewski
* @author Pawel Glyzewski
*/
*/
public
class
MetaprojectPredicate
extends
Abstract
Predicate
<
Metaproject
>
public
class
MetaprojectPredicate
extends
Delegated
Predicate
<
TechId
,
Metaproject
>
{
{
@Override
public
MetaprojectPredicate
()
public
void
init
(
IAuthorizationDataProvider
provider
)
{
{
super
(
new
MetaprojectTechIdPredicate
());
}
}
@Override
@Override
public
String
getCandidateDescription
(
)
public
TechId
tryConvert
(
Metaproject
value
)
{
{
return
"Metaproject"
;
return
new
TechId
(
value
.
getId
())
;
}
}
@Override
@Override
protected
Status
doEvaluation
(
PersonPE
person
,
List
<
RoleWithIdentifier
>
allowedRoles
,
public
String
getCandidateDescription
()
Metaproject
metaproject
)
{
{
if
(
person
.
getUserId
().
equals
(
metaproject
.
getOwnerId
()))
return
"Metaproject"
;
{
return
Status
.
OK
;
}
return
Status
.
createError
(
String
.
format
(
"User '%s' is not an owner of the metaproject '%s'."
,
person
.
getUserId
(),
metaproject
.
getName
()));
}
}
}
}
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