curation_concerns 1.7.0.beta1 → 1.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/concerns/curation_concerns/application_controller_behavior.rb +2 -8
  3. data/app/controllers/concerns/curation_concerns/collections_controller_behavior.rb +13 -13
  4. data/app/controllers/concerns/curation_concerns/curation_concern_controller.rb +40 -3
  5. data/app/controllers/concerns/curation_concerns/selects_collections.rb +2 -0
  6. data/app/controllers/concerns/curation_concerns/single_use_links_controller_behavior.rb +9 -7
  7. data/app/models/concerns/curation_concerns/solr_document_behavior.rb +8 -0
  8. data/app/models/concerns/curation_concerns/suppressible.rb +31 -0
  9. data/app/models/concerns/curation_concerns/work_behavior.rb +1 -1
  10. data/app/presenters/curation_concerns/inspect_work_presenter.rb +52 -0
  11. data/app/presenters/curation_concerns/work_show_presenter.rb +4 -0
  12. data/app/search_builders/curation_concerns/README.md +69 -0
  13. data/app/search_builders/curation_concerns/collection_search_builder.rb +35 -17
  14. data/app/search_builders/curation_concerns/filter_suppressed.rb +15 -0
  15. data/app/search_builders/curation_concerns/filter_suppressed_with_roles.rb +30 -0
  16. data/app/search_builders/curation_concerns/search_filters.rb +1 -0
  17. data/app/search_builders/curation_concerns/single_collection_search_builder.rb +5 -0
  18. data/app/search_builders/curation_concerns/work_search_builder.rb +1 -0
  19. data/app/services/curation_concerns/actors/actor_factory.rb +0 -1
  20. data/app/services/curation_concerns/embargo_service.rb +0 -13
  21. data/app/services/curation_concerns/workflow/action_taken_service.rb +25 -15
  22. data/app/services/curation_concerns/workflow/activate_object.rb +9 -2
  23. data/app/services/curation_concerns/workflow/deactivate_object.rb +9 -4
  24. data/app/services/curation_concerns/workflow/{remove_depositor_permissions.rb → grant_edit_to_depositor.rb} +4 -4
  25. data/app/services/curation_concerns/workflow/workflow_action_service.rb +1 -1
  26. data/app/services/curation_concerns/working_directory.rb +1 -1
  27. data/app/views/curation_concerns/base/inspect_work.html.erb +37 -0
  28. data/app/views/curation_concerns/base/unavailable.html.erb +10 -0
  29. data/app/views/curation_concerns/operations/index.html.erb +1 -1
  30. data/app/views/curation_concerns/operations/show.html.erb +1 -1
  31. data/config/locales/curation_concerns.en.yml +3 -0
  32. data/curation_concerns.gemspec +3 -3
  33. data/lib/curation_concerns/rails/routes.rb +1 -0
  34. data/lib/curation_concerns/version.rb +1 -1
  35. data/lib/curation_concerns/workflow_authorization_exception.rb +4 -0
  36. data/lib/generators/curation_concerns/templates/workflow.json.erb +1 -0
  37. data/spec/controllers/curation_concerns/generic_works_controller_spec.rb +78 -16
  38. data/spec/controllers/selects_collections_controller_spec.rb +2 -4
  39. data/spec/factories/generic_works.rb +6 -0
  40. data/spec/factories/workflows.rb +1 -1
  41. data/spec/features/add_file_spec.rb +3 -0
  42. data/spec/features/create_child_work_spec.rb +13 -7
  43. data/spec/features/update_file_spec.rb +3 -2
  44. data/spec/forms/curation_concerns/forms/workflow_action_form_spec.rb +2 -4
  45. data/spec/indexers/work_indexer_spec.rb +11 -7
  46. data/spec/jobs/characterize_job_spec.rb +2 -2
  47. data/spec/models/curation_concerns/work_behavior_spec.rb +1 -1
  48. data/spec/models/generic_work_spec.rb +16 -7
  49. data/spec/models/solr_document_spec.rb +13 -0
  50. data/spec/presenters/curation_concerns/inspect_work_presenter_spec.rb +58 -0
  51. data/spec/presenters/curation_concerns/work_show_presenter_spec.rb +9 -0
  52. data/spec/presenters/curation_concerns/workflow_presenter_spec.rb +29 -15
  53. data/spec/routing/route_spec.rb +4 -0
  54. data/spec/services/curation_concerns/workflow/action_taken_service_spec.rb +5 -6
  55. data/spec/services/curation_concerns/workflow/activate_object_spec.rb +13 -12
  56. data/spec/services/curation_concerns/workflow/deactivate_object_spec.rb +14 -13
  57. data/spec/services/curation_concerns/workflow/grant_edit_to_depositor_spec.rb +20 -0
  58. data/spec/services/curation_concerns/workflow/permission_query_spec.rb +3 -3
  59. data/spec/services/curation_concerns/workflow/status_list_service_spec.rb +4 -1
  60. data/spec/services/curation_concerns/workflow/workflow_importer_spec.rb +2 -3
  61. data/spec/services/curation_concerns/working_directory_spec.rb +12 -0
  62. data/spec/views/curation_concerns/base/unavailable.html.erb_spec.rb +40 -0
  63. metadata +34 -20
  64. data/app/actors/curation_concerns/actors/grant_edit_to_depositor_actor.rb +0 -19
  65. data/app/models/concerns/curation_concerns/publishable.rb +0 -25
  66. data/app/models/curation_concerns/state_workflow.rb +0 -13
  67. data/app/views/curation_concerns/file_sets/_rights_modal.html.erb +0 -41
  68. data/app/views/records/_rights_modal.html.erb +0 -1
  69. data/spec/actors/curation_concerns/grant_edit_to_depositor_actor_spec.rb +0 -32
  70. data/spec/services/curation_concerns/workflow/remove_depositor_permissions_spec.rb +0 -21
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: curation_concerns
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.0.beta1
4
+ version: 1.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Zumwalt
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2016-11-16 00:00:00.000000000 Z
13
+ date: 2016-12-09 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: hydra-head
@@ -18,7 +18,7 @@ dependencies:
18
18
  requirements:
19
19
  - - ">="
20
20
  - !ruby/object:Gem::Version
21
- version: 10.0.0
21
+ version: 10.3.0
22
22
  - - "<"
23
23
  - !ruby/object:Gem::Version
24
24
  version: '11'
@@ -28,7 +28,7 @@ dependencies:
28
28
  requirements:
29
29
  - - ">="
30
30
  - !ruby/object:Gem::Version
31
- version: 10.0.0
31
+ version: 10.3.0
32
32
  - - "<"
33
33
  - !ruby/object:Gem::Version
34
34
  version: '11'
@@ -84,16 +84,16 @@ dependencies:
84
84
  name: jquery-ui-rails
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ">="
87
+ - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '0'
89
+ version: 5.0.5
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ">="
94
+ - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '0'
96
+ version: 5.0.5
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: simple_form
99
99
  requirement: !ruby/object:Gem::Requirement
@@ -303,6 +303,9 @@ dependencies:
303
303
  - - "~>"
304
304
  - !ruby/object:Gem::Version
305
305
  version: '0.10'
306
+ - - ">="
307
+ - !ruby/object:Gem::Version
308
+ version: 0.10.5
306
309
  type: :runtime
307
310
  prerelease: false
308
311
  version_requirements: !ruby/object:Gem::Requirement
@@ -310,6 +313,9 @@ dependencies:
310
313
  - - "~>"
311
314
  - !ruby/object:Gem::Version
312
315
  version: '0.10'
316
+ - - ">="
317
+ - !ruby/object:Gem::Version
318
+ version: 0.10.5
313
319
  - !ruby/object:Gem::Dependency
314
320
  name: clipboard-rails
315
321
  requirement: !ruby/object:Gem::Requirement
@@ -761,7 +767,6 @@ files:
761
767
  - app/actors/curation_concerns/actors/embargo_actor.rb
762
768
  - app/actors/curation_concerns/actors/file_actor.rb
763
769
  - app/actors/curation_concerns/actors/file_set_actor.rb
764
- - app/actors/curation_concerns/actors/grant_edit_to_depositor_actor.rb
765
770
  - app/actors/curation_concerns/actors/initialize_workflow_actor.rb
766
771
  - app/actors/curation_concerns/actors/interpret_visibility_actor.rb
767
772
  - app/actors/curation_concerns/actors/lease_actor.rb
@@ -913,11 +918,11 @@ files:
913
918
  - app/models/concerns/curation_concerns/permissions.rb
914
919
  - app/models/concerns/curation_concerns/permissions/readable.rb
915
920
  - app/models/concerns/curation_concerns/permissions/writable.rb
916
- - app/models/concerns/curation_concerns/publishable.rb
917
921
  - app/models/concerns/curation_concerns/required_metadata.rb
918
922
  - app/models/concerns/curation_concerns/serializers.rb
919
923
  - app/models/concerns/curation_concerns/solr_behavior/characterization.rb
920
924
  - app/models/concerns/curation_concerns/solr_document_behavior.rb
925
+ - app/models/concerns/curation_concerns/suppressible.rb
921
926
  - app/models/concerns/curation_concerns/user.rb
922
927
  - app/models/concerns/curation_concerns/with_file_sets.rb
923
928
  - app/models/concerns/curation_concerns/work_behavior.rb
@@ -925,7 +930,6 @@ files:
925
930
  - app/models/curation_concerns/group.rb
926
931
  - app/models/curation_concerns/operation.rb
927
932
  - app/models/curation_concerns/quick_classification_query.rb
928
- - app/models/curation_concerns/state_workflow.rb
929
933
  - app/models/curation_concerns/workflow_action_info.rb
930
934
  - app/models/single_use_link.rb
931
935
  - app/models/sipity/agent.rb
@@ -952,6 +956,7 @@ files:
952
956
  - app/presenters/curation_concerns/composite_presenter_factory.rb
953
957
  - app/presenters/curation_concerns/embargo_presenter.rb
954
958
  - app/presenters/curation_concerns/file_set_presenter.rb
959
+ - app/presenters/curation_concerns/inspect_work_presenter.rb
955
960
  - app/presenters/curation_concerns/lease_presenter.rb
956
961
  - app/presenters/curation_concerns/model_proxy.rb
957
962
  - app/presenters/curation_concerns/permission_badge.rb
@@ -970,6 +975,7 @@ files:
970
975
  - app/renderers/curation_concerns/renderers/faceted_attribute_renderer.rb
971
976
  - app/renderers/curation_concerns/renderers/linked_attribute_renderer.rb
972
977
  - app/renderers/curation_concerns/renderers/rights_attribute_renderer.rb
978
+ - app/search_builders/curation_concerns/README.md
973
979
  - app/search_builders/curation_concerns/admin_set_search_builder.rb
974
980
  - app/search_builders/curation_concerns/collection_member_search_builder.rb
975
981
  - app/search_builders/curation_concerns/collection_search_builder.rb
@@ -980,9 +986,12 @@ files:
980
986
  - app/search_builders/curation_concerns/expired_lease_search_builder.rb
981
987
  - app/search_builders/curation_concerns/file_set_search_builder.rb
982
988
  - app/search_builders/curation_concerns/filter_by_type.rb
989
+ - app/search_builders/curation_concerns/filter_suppressed.rb
990
+ - app/search_builders/curation_concerns/filter_suppressed_with_roles.rb
983
991
  - app/search_builders/curation_concerns/lease_search_builder.rb
984
992
  - app/search_builders/curation_concerns/member_search_builder.rb
985
993
  - app/search_builders/curation_concerns/search_filters.rb
994
+ - app/search_builders/curation_concerns/single_collection_search_builder.rb
986
995
  - app/search_builders/curation_concerns/single_result.rb
987
996
  - app/search_builders/curation_concerns/single_use_link_search_builder.rb
988
997
  - app/search_builders/curation_concerns/work_relation.rb
@@ -1019,13 +1028,13 @@ files:
1019
1028
  - app/services/curation_concerns/workflow/activate_object.rb
1020
1029
  - app/services/curation_concerns/workflow/deactivate_object.rb
1021
1030
  - app/services/curation_concerns/workflow/default_workflow_strategy.rb
1031
+ - app/services/curation_concerns/workflow/grant_edit_to_depositor.rb
1022
1032
  - app/services/curation_concerns/workflow/method_generator.rb
1023
1033
  - app/services/curation_concerns/workflow/notification_configuration_parameter.rb
1024
1034
  - app/services/curation_concerns/workflow/notification_generator.rb
1025
1035
  - app/services/curation_concerns/workflow/notification_service.rb
1026
1036
  - app/services/curation_concerns/workflow/permission_generator.rb
1027
1037
  - app/services/curation_concerns/workflow/permission_query.rb
1028
- - app/services/curation_concerns/workflow/remove_depositor_permissions.rb
1029
1038
  - app/services/curation_concerns/workflow/sipity_actions_generator.rb
1030
1039
  - app/services/curation_concerns/workflow/state_machine_generator.rb
1031
1040
  - app/services/curation_concerns/workflow/status_list_service.rb
@@ -1143,16 +1152,17 @@ files:
1143
1152
  - app/views/curation_concerns/base/_workflow_actions.html.erb
1144
1153
  - app/views/curation_concerns/base/edit.html.erb
1145
1154
  - app/views/curation_concerns/base/file_manager.html.erb
1155
+ - app/views/curation_concerns/base/inspect_work.html.erb
1146
1156
  - app/views/curation_concerns/base/new.html.erb
1147
1157
  - app/views/curation_concerns/base/show.html.erb
1148
1158
  - app/views/curation_concerns/base/show.json.jbuilder
1149
1159
  - app/views/curation_concerns/base/unauthorized.html.erb
1160
+ - app/views/curation_concerns/base/unavailable.html.erb
1150
1161
  - app/views/curation_concerns/base/versions.html.erb
1151
1162
  - app/views/curation_concerns/classify_concerns/new.html.erb
1152
1163
  - app/views/curation_concerns/collections/_form_additional_information.html.erb
1153
1164
  - app/views/curation_concerns/file_sets/_actions.html.erb
1154
1165
  - app/views/curation_concerns/file_sets/_form.html.erb
1155
- - app/views/curation_concerns/file_sets/_rights_modal.html.erb
1156
1166
  - app/views/curation_concerns/file_sets/_show_actions.html.erb
1157
1167
  - app/views/curation_concerns/file_sets/_single_use_link_rows.html.erb
1158
1168
  - app/views/curation_concerns/file_sets/_single_use_links.html.erb
@@ -1195,7 +1205,6 @@ files:
1195
1205
  - app/views/leases/_list_expired_active_leases.html.erb
1196
1206
  - app/views/leases/edit.html.erb
1197
1207
  - app/views/leases/index.html.erb
1198
- - app/views/records/_rights_modal.html.erb
1199
1208
  - app/views/records/edit_fields/_default.html.erb
1200
1209
  - app/views/records/show_fields/_default.html.erb
1201
1210
  - app/views/shared/_add_content.html.erb
@@ -1235,6 +1244,7 @@ files:
1235
1244
  - lib/curation_concerns/single_use_error.rb
1236
1245
  - lib/curation_concerns/spec_support.rb
1237
1246
  - lib/curation_concerns/version.rb
1247
+ - lib/curation_concerns/workflow_authorization_exception.rb
1238
1248
  - lib/generators/curation_concerns/admin_dashboard_generator.rb
1239
1249
  - lib/generators/curation_concerns/assets_generator.rb
1240
1250
  - lib/generators/curation_concerns/clamav_generator.rb
@@ -1305,7 +1315,6 @@ files:
1305
1315
  - spec/actors/curation_concerns/embargo_actor_spec.rb
1306
1316
  - spec/actors/curation_concerns/file_actor_spec.rb
1307
1317
  - spec/actors/curation_concerns/file_set_actor_spec.rb
1308
- - spec/actors/curation_concerns/grant_edit_to_depositor_actor_spec.rb
1309
1318
  - spec/actors/curation_concerns/initialize_workflow_actor_spec.rb
1310
1319
  - spec/actors/curation_concerns/interpret_visibility_actor_spec.rb
1311
1320
  - spec/actors/curation_concerns/lease_actor_spec.rb
@@ -1447,6 +1456,7 @@ files:
1447
1456
  - spec/models/user_spec.rb
1448
1457
  - spec/presenters/curation_concerns/collection_presenter_spec.rb
1449
1458
  - spec/presenters/curation_concerns/file_set_presenter_spec.rb
1459
+ - spec/presenters/curation_concerns/inspect_work_presenter_spec.rb
1450
1460
  - spec/presenters/curation_concerns/permission_badge_spec.rb
1451
1461
  - spec/presenters/curation_concerns/presenter_factory_spec.rb
1452
1462
  - spec/presenters/curation_concerns/single_use_link_presenter_spec.rb
@@ -1479,19 +1489,20 @@ files:
1479
1489
  - spec/services/curation_concerns/workflow/action_taken_service_spec.rb
1480
1490
  - spec/services/curation_concerns/workflow/activate_object_spec.rb
1481
1491
  - spec/services/curation_concerns/workflow/deactivate_object_spec.rb
1492
+ - spec/services/curation_concerns/workflow/grant_edit_to_depositor_spec.rb
1482
1493
  - spec/services/curation_concerns/workflow/method_generator_spec.rb
1483
1494
  - spec/services/curation_concerns/workflow/notification_configuration_parameter_spec.rb
1484
1495
  - spec/services/curation_concerns/workflow/notification_generator_spec.rb
1485
1496
  - spec/services/curation_concerns/workflow/notification_service_spec.rb
1486
1497
  - spec/services/curation_concerns/workflow/permission_generator_spec.rb
1487
1498
  - spec/services/curation_concerns/workflow/permission_query_spec.rb
1488
- - spec/services/curation_concerns/workflow/remove_depositor_permissions_spec.rb
1489
1499
  - spec/services/curation_concerns/workflow/sipity_actions_generator_spec.rb
1490
1500
  - spec/services/curation_concerns/workflow/state_machine_generator_spec.rb
1491
1501
  - spec/services/curation_concerns/workflow/status_list_service_spec.rb
1492
1502
  - spec/services/curation_concerns/workflow/workflow_importer_spec.rb
1493
1503
  - spec/services/curation_concerns/workflow/workflow_permissions_generator_spec.rb
1494
1504
  - spec/services/curation_concerns/workflow/workflow_schema_spec.rb
1505
+ - spec/services/curation_concerns/working_directory_spec.rb
1495
1506
  - spec/services/derivative_path_spec.rb
1496
1507
  - spec/services/embargo_service_spec.rb
1497
1508
  - spec/services/file_set_audit_service_spec.rb
@@ -1539,6 +1550,7 @@ files:
1539
1550
  - spec/views/curation_concerns/base/show.html.erb_spec.rb
1540
1551
  - spec/views/curation_concerns/base/show.json.jbuilder_spec.rb
1541
1552
  - spec/views/curation_concerns/base/unauthorized.html.erb_spec.rb
1553
+ - spec/views/curation_concerns/base/unavailable.html.erb_spec.rb
1542
1554
  - spec/views/curation_concerns/file_sets/show.html.erb_spec.rb
1543
1555
  - spec/views/curation_concerns/file_sets/show.json.jbuilder_spec.rb
1544
1556
  - spec/views/curation_concerns/permissions/confirm.html.erb_spec.rb
@@ -1573,9 +1585,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
1573
1585
  version: '0'
1574
1586
  required_rubygems_version: !ruby/object:Gem::Requirement
1575
1587
  requirements:
1576
- - - ">"
1588
+ - - ">="
1577
1589
  - !ruby/object:Gem::Version
1578
- version: 1.3.1
1590
+ version: '0'
1579
1591
  requirements: []
1580
1592
  rubyforge_project:
1581
1593
  rubygems_version: 2.5.1
@@ -1596,7 +1608,6 @@ test_files:
1596
1608
  - spec/actors/curation_concerns/embargo_actor_spec.rb
1597
1609
  - spec/actors/curation_concerns/file_actor_spec.rb
1598
1610
  - spec/actors/curation_concerns/file_set_actor_spec.rb
1599
- - spec/actors/curation_concerns/grant_edit_to_depositor_actor_spec.rb
1600
1611
  - spec/actors/curation_concerns/initialize_workflow_actor_spec.rb
1601
1612
  - spec/actors/curation_concerns/interpret_visibility_actor_spec.rb
1602
1613
  - spec/actors/curation_concerns/lease_actor_spec.rb
@@ -1738,6 +1749,7 @@ test_files:
1738
1749
  - spec/models/user_spec.rb
1739
1750
  - spec/presenters/curation_concerns/collection_presenter_spec.rb
1740
1751
  - spec/presenters/curation_concerns/file_set_presenter_spec.rb
1752
+ - spec/presenters/curation_concerns/inspect_work_presenter_spec.rb
1741
1753
  - spec/presenters/curation_concerns/permission_badge_spec.rb
1742
1754
  - spec/presenters/curation_concerns/presenter_factory_spec.rb
1743
1755
  - spec/presenters/curation_concerns/single_use_link_presenter_spec.rb
@@ -1770,19 +1782,20 @@ test_files:
1770
1782
  - spec/services/curation_concerns/workflow/action_taken_service_spec.rb
1771
1783
  - spec/services/curation_concerns/workflow/activate_object_spec.rb
1772
1784
  - spec/services/curation_concerns/workflow/deactivate_object_spec.rb
1785
+ - spec/services/curation_concerns/workflow/grant_edit_to_depositor_spec.rb
1773
1786
  - spec/services/curation_concerns/workflow/method_generator_spec.rb
1774
1787
  - spec/services/curation_concerns/workflow/notification_configuration_parameter_spec.rb
1775
1788
  - spec/services/curation_concerns/workflow/notification_generator_spec.rb
1776
1789
  - spec/services/curation_concerns/workflow/notification_service_spec.rb
1777
1790
  - spec/services/curation_concerns/workflow/permission_generator_spec.rb
1778
1791
  - spec/services/curation_concerns/workflow/permission_query_spec.rb
1779
- - spec/services/curation_concerns/workflow/remove_depositor_permissions_spec.rb
1780
1792
  - spec/services/curation_concerns/workflow/sipity_actions_generator_spec.rb
1781
1793
  - spec/services/curation_concerns/workflow/state_machine_generator_spec.rb
1782
1794
  - spec/services/curation_concerns/workflow/status_list_service_spec.rb
1783
1795
  - spec/services/curation_concerns/workflow/workflow_importer_spec.rb
1784
1796
  - spec/services/curation_concerns/workflow/workflow_permissions_generator_spec.rb
1785
1797
  - spec/services/curation_concerns/workflow/workflow_schema_spec.rb
1798
+ - spec/services/curation_concerns/working_directory_spec.rb
1786
1799
  - spec/services/derivative_path_spec.rb
1787
1800
  - spec/services/embargo_service_spec.rb
1788
1801
  - spec/services/file_set_audit_service_spec.rb
@@ -1830,6 +1843,7 @@ test_files:
1830
1843
  - spec/views/curation_concerns/base/show.html.erb_spec.rb
1831
1844
  - spec/views/curation_concerns/base/show.json.jbuilder_spec.rb
1832
1845
  - spec/views/curation_concerns/base/unauthorized.html.erb_spec.rb
1846
+ - spec/views/curation_concerns/base/unavailable.html.erb_spec.rb
1833
1847
  - spec/views/curation_concerns/file_sets/show.html.erb_spec.rb
1834
1848
  - spec/views/curation_concerns/file_sets/show.json.jbuilder_spec.rb
1835
1849
  - spec/views/curation_concerns/permissions/confirm.html.erb_spec.rb
@@ -1,19 +0,0 @@
1
- module CurationConcerns
2
- module Actors
3
- # Grants edit access to the depositor. This is implemented as a separate actor,
4
- # so that it can be removed from the stack in cases where the depositor should not
5
- # have edit access (e.g. mediated deposit)
6
- class GrantEditToDepositorActor < AbstractActor
7
- def create(attributes)
8
- grant_edit_access
9
- next_actor.create(attributes)
10
- end
11
-
12
- private
13
-
14
- def grant_edit_access
15
- curation_concern.edit_users += [user.user_key]
16
- end
17
- end
18
- end
19
- end
@@ -1,25 +0,0 @@
1
- module CurationConcerns
2
- # Workflow considerations
3
- module Publishable
4
- extend ActiveSupport::Concern
5
-
6
- included do
7
- # This holds the workflow state
8
- property :state, predicate: Vocab::FedoraResourceStatus.objState, multiple: false
9
-
10
- class_attribute :state_workflow, instance_writer: false
11
- self.state_workflow = StateWorkflow
12
- end
13
-
14
- # Override this method if you have some critera by which records should not
15
- # display in the search results.
16
- def suppressed?
17
- state_workflow.new(state).pending?
18
- end
19
-
20
- def to_sipity_entity
21
- raise "Can't create an entity until the model has been persisted" unless persisted?
22
- @sipity_entity ||= Sipity::Entity.find_by(proxy_for_global_id: to_global_id.to_s)
23
- end
24
- end
25
- end
@@ -1,13 +0,0 @@
1
- module CurationConcerns
2
- class StateWorkflow
3
- # @param [String, RDF::Term] state a represesentation of the workflow
4
- def initialize(state)
5
- @state = state.respond_to?(:to_sym) ? state.to_sym : state
6
- end
7
- attr_reader :state
8
-
9
- def pending?
10
- state == :pending
11
- end
12
- end
13
- end
@@ -1,41 +0,0 @@
1
- <div class="modal-div">
2
- <!-- Modal -->
3
- <div class="modal fade" id="rightsModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
4
- <div class="modal-dialog">
5
- <div class="modal-content">
6
- <div class="modal-header">
7
- <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
8
- <h2 id="rightsModallLabel"><%= t('sufia.product_name') %> License Descriptions</h2>
9
- </div>
10
- <div class="modal-body">
11
- <p>Creative Commons licenses can take the following combinations, which is what a depositor sees on the page where metadata (descriptions) are entered. Via the drop-down menu, the depositor may select any of the following licenses (these are all described at "About the Licenses" on the Creative Commons site):
12
- </p> <ul>
13
- <li><b>Attribution 3.0: CC BY</b><br/>
14
- With this license you allow others to "distribute, remix, tweak, and build" on your deposited content - including for commercial purposes - provided they attribute you as the original creator.</li>
15
- <li><b>Attribution-Share-Alike 3.0: CC BY-SA</b> <br/>
16
- With this license you allow others to "remix, tweak, and build" on your deposited content, including for commercial uses, provided they attribute you as the original creator AND incorporate the same level of licensing (i.e., CC BY-SA) for the newly resulting creation. "All new works based on yours will carry the same license, so any derivatives will also allow commercial use."</li>
17
- <li><b>Attribution-NoDerivs 3.0: CC BY-ND </b><br/>
18
- With this license you permit "redistribution, commercial and non-commercial," provided the content remains unaltered and intact (i.e., whole) and provided you are attributed as the original creator.</li>
19
- <li><b>Attribution-Non-Commercial 3.0: CC BY-NC</b><br/>
20
- With this license you allow others to "remix, tweak, and build" on your content in non-commercial ways. While they must credit you as the original creator and while the remixed, tweaked, or expanded upon content must remain non-commercial, they do not have to apply identical license terms on the new content.</li>
21
- <li><b>Attribution-NonCommercial-NoDerivs 3.0 CC BY-NC-ND</b><br/>
22
- With this license you share your work with others and allow them to download your work, provided they attribute you as the creator and refrain from changing the content in any way and from using it for commercial means. </li>
23
- <li><b>Attribution-Non-Commercial-Share-Alike 3.0: CC BY-NC-SA</b><br/>
24
- With this license you allow others to "remix, tweak, and build" on your content in non-commercial ways, provided they give you credit (as the original creator) and also apply the same license level to the newly resulting creations.</li>
25
- <li><b>Attribution-Non-Commercial-Share-Alike-NoDerivs 3.0: CC BY-NC-SA-ND</b><br/>
26
- With this license you share your work with others and allow them to download it, provided they attribute you as the creator; they must also refrain from changing the content in any way and from using it for commercial means. </li>
27
- <li><b>Public Domain Mark 1.0 </b><br/>
28
- When content is in the public domain, it has no known copyright owner. </li>
29
- <li><b>CC0 1.0 Universal </b><br/>
30
- With this license you are waiving your rights as copyright owner to the content you upload. This means your content may be distributed and reused without attribution, without restriction. CC0 is a license that one applies to one's own work; rarely does one apply it to another's work, unless one has the appropriate rights to do so.</li>
31
- </ul>
32
- </p>
33
- <p> Please note: Another license option that is listed is <b>"All rights reserved."</b> With this license you - as the copyright holder - reserve all rights held under copyright law, such as for distribution and creation of derivative works. This means that no one can use your content in a work - such as a presentation or article - or create derivatives from it without your permission.</p>
34
- </div>
35
- <div class="modal-footer">
36
- <button class="btn btn-primary" data-dismiss="modal">Close</button>
37
- </div>
38
- </div>
39
- </div>
40
- </div>
41
- </div>
@@ -1 +0,0 @@
1
- <%= render partial: "file_sets/rights_modal" %>
@@ -1,32 +0,0 @@
1
- require 'spec_helper'
2
- describe CurationConcerns::Actors::GrantEditToDepositorActor, :workflow do
3
- let(:user) { create(:user) }
4
- let(:curation_concern) { GenericWork.new }
5
- let(:attributes) { { title: ['test'] } }
6
-
7
- subject do
8
- CurationConcerns::Actors::ActorStack.new(curation_concern,
9
- user,
10
- [described_class,
11
- CurationConcerns::Actors::GenericWorkActor])
12
- end
13
-
14
- describe 'the next actor' do
15
- let(:root_actor) { double }
16
- before do
17
- allow(CurationConcerns::Actors::RootActor).to receive(:new).and_return(root_actor)
18
- end
19
-
20
- it 'passes the attributes on' do
21
- expect(root_actor).to receive(:create).with(title: ['test'])
22
- subject.create(attributes)
23
- end
24
- end
25
-
26
- describe 'create' do
27
- it 'gives the creator depositor access' do
28
- expect(subject.create(attributes)).to be true
29
- expect(curation_concern.edit_users).to eq [user.user_key]
30
- end
31
- end
32
- end
@@ -1,21 +0,0 @@
1
- require 'spec_helper'
2
-
3
- RSpec.describe CurationConcerns::Workflow::RemoveDepositorPermissions do
4
- let(:work) { create(:work) }
5
- let(:entity) { instance_double(Sipity::Entity, id: 9999, proxy_for: work) }
6
- let(:user) { User.new }
7
-
8
- describe ".call" do
9
- subject do
10
- described_class.call(entity: entity,
11
- comment: "A pleasant read",
12
- user: user)
13
- end
14
-
15
- it "strips edit access " do
16
- subject
17
- expect(work).to be_valid
18
- expect(work.edit_users).to eq []
19
- end
20
- end
21
- end