Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
RDMS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
researchdata
RDMS
Commits
61eef9e6
Commit
61eef9e6
authored
1 year ago
by
Anusha Ranganathan
Browse files
Options
Downloads
Patches
Plain Diff
Setup both workflows with psrticipants and visibility settings
parent
bbcffedc
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!197
Bug/fix workflow action visibility 2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
hyrax/lib/tasks/default_admin_set_for_workflow.rake
+16
-5
16 additions, 5 deletions
hyrax/lib/tasks/default_admin_set_for_workflow.rake
with
16 additions
and
5 deletions
hyrax/lib/tasks/default_admin_set_for_workflow.rake
+
16
−
5
View file @
61eef9e6
...
...
@@ -24,16 +24,27 @@ namespace :hyrax do
Sipity
::
Workflow
.
activate!
(
permission_template:
admin_set
.
permission_template
,
workflow_id:
mediated_workflow
.
id
)
# Update Participants For RUB AdminSet
# Add Participants
pub_manager
=
ENV
.
fetch
(
'SYSTEM_PUBLICATION_MANAGER'
,
'publication_manager@hyrax'
)
access_grants_params_for_manage
=
{
access_grants_attributes
:{
'0'
=>
{
agent_type:
"user"
,
agent_id:
pub_manager
,
access
:"manage"
}}}
if
title
==
rub_default_admin_set_title
access_grants_params_for_
all_users
=
{
access_grants_attributes
:{
'0'
=>
{
agent_type:
"group"
,
agent_id:
'registered'
,
access
:"deposit"
}}}
permission_template_form
=
Hyrax
::
Forms
::
PermissionTemplateForm
.
new
(
admin_set
.
permission_template
)
permission_template_form
.
update
(
access_grants_params_for_all_users
)
access_grants_params_for_
deposit
=
{
access_grants_attributes
:{
'0'
=>
{
agent_type:
"group"
,
agent_id:
'registered'
,
access
:"deposit"
}}}
else
access_grants_params_for_deposit
=
{
access_grants_attributes
:{
'0'
=>
{
agent_type:
"group"
,
agent_id:
'crc_1280_member'
,
access
:"deposit"
}}}
end
permission_template_form
=
Hyrax
::
Forms
::
PermissionTemplateForm
.
new
(
admin_set
.
permission_template
)
permission_template_form
.
update
(
access_grants_params_for_manage
)
permission_template_form
.
update
(
access_grants_params_for_deposit
)
# Set visibility
visibility_params
=
{
release_period:
Hyrax
::
PermissionTemplate
::
RELEASE_TEXT_VALUE_NO_DELAY
,
visibility:
'restricted'
}
permission_template_form
.
update
(
visibility_params
)
end
end
else
puts
"Admin Sets not created, No Admin user exist"
puts
"Admin Sets not created, No Admin user exist
s.
"
end
end
end
...
...
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