Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add licenses #1111

Merged
merged 17 commits into from Apr 15, 2019

Conversation

Projects
None yet
3 participants
@Macroz
Copy link
Collaborator

commented Apr 11, 2019

Implements #830 by the way of using the regular licenses.

  • add-licenses command, licenses-added event and an action UI add_licenses.cljs.
  • Regular accept licenses workflow for the acceptance part.

Open questions:

  • Currently owner is able to add new licenses and a handler doesn't. Should it be possible for a handler to admin or how would an ad-hoc license for one application be created?
  • Does not refactor adding licenses away from the created away. Perhaps it does not make sense after all.
@luontola
Copy link
Collaborator

left a comment

Needs tests for the newly added command in rems.workflow.test-dynamic and event in rems.application.test-model/test-application-view

@opqdonut
Copy link
Collaborator

left a comment

feel free to merge after fixing

Show resolved Hide resolved src/clj/rems/application/model.clj Outdated
Show resolved Hide resolved src/clj/rems/workflow/dynamic.clj Outdated
Show resolved Hide resolved src/clj/rems/workflow/dynamic.clj
Show resolved Hide resolved src/cljs/rems/actions/add_licenses.cljs
Show resolved Hide resolved src/cljs/rems/actions/add_licenses.cljs Outdated
Show resolved Hide resolved test/clj/rems/application/test_model.clj

Macroz added some commits Apr 15, 2019

refactor: using select-keys is more explicit
Maybe there is no need to map here and just copying the whole
structure would work too.
refactor: use same structure for :application/licenses
- instead of set of ids use seq of maps with :license/id
- this is the same structure as in the created event

Macroz added some commits Apr 15, 2019

feat: additional test cases for accepting licenses
- member acceptance is tracked separate
- acceptance overwrites previously accepted licenses

@Macroz Macroz merged commit 9683ef8 into master Apr 15, 2019

6 checks passed

ci/circleci: build Your tests passed on CircleCI!
Details
ci/circleci: doo Your tests passed on CircleCI!
Details
ci/circleci: ok Your tests passed on CircleCI!
Details
ci/circleci: test Your tests passed on CircleCI!
Details
ci/circleci: war Your tests passed on CircleCI!
Details
ci/circleci: without-db Your tests passed on CircleCI!
Details

@Macroz Macroz deleted the add-licenses branch Apr 15, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.