Repository navigation
Support TerminologySets
#2425
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
Support TerminologySets
#2425
Changes from all commits
dfc2e8b
c436893
4a77165
53cafb0
70bae33
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -268,6 +268,8 @@ context key). | |
| | edit | proposal | Create or update proposal versions for the funder's proposals | | ||
| | view | source | View the funder's sources | | ||
| | create | source | Create sources associated with the funder | | ||
| | view | terminologySet | View the funder's terminology sets | | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am trying to imagine a case where a funder would like some other party to be able to view the funder but then not view the preferred terminology of that funder.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We could say that viewing a funder means viewing all of the funder's terminology sets, but it is starting to stray from the grant permission design philosophy. Also remember this also covers the inverse (you can view the terminology set but not the funder)
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, yes, that last capability makes sense.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Except, if we are using
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No -- that isn't the behavior across any of our FK relationships (nor should it be). If you have the permission to view an entity you can view all of its attributes. (now, you wouldn't see the actual OBJECT unless you have permission!)
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Rather than thinking in terms of the technical implementation (FK relationships) I'm thinking more in terms of UX: if you can view the terminology set but not the funder, we can't truly do that if the funder name is part of the terminology set. |
||
| | edit | terminologySet | Create or update terminology sets owned by the funder | | ||
| | manage | funder | View, send, and respond to funder collaborative invitations | | ||
| | | | View collaborative members for the funder | | ||
|
|
||
|
|
@@ -325,6 +327,28 @@ not by a separate field-level permission. | |
| | view | applicationForm | View the specific application form and its fields | | ||
| | edit | applicationForm | Update the application form (including its fields' labels, instructions, and input types via `PATCH /applicationFormFields/:id`) | | ||
|
|
||
| ### TerminologySet Permissions | ||
|
|
||
| Permissions granted against a terminology set (using the terminology set's `id` | ||
| as the context key). Terminology sets are funder-scoped: an `edit | | ||
| terminologySet` grant on a funder automatically applies to all of that funder's | ||
| terminology sets. Opportunity-level grants do **not** confer access to | ||
| terminology sets — terminology sets inherit only from the parent funder. | ||
|
|
||
| Because opportunity responses embed the bound terminology set, the inlined | ||
| `terminologySet` is only populated when the caller has `view | terminologySet` | ||
| (directly or via the funder cascade). Callers without that permission still see | ||
| the opportunity's `terminologySetId`, but the inlined `terminologySet` is | ||
| `null`. This keeps the embed consistent with the rule above: viewing an | ||
| opportunity does not, by itself, grant access to its terminology set's details. | ||
|
|
||
| | Verb | Scope | What It Enables | | ||
| | --------- | -------------- | -------------------------------------------------------------------------------------------- | | ||
| | view | terminologySet | View the specific terminology set | | ||
| | edit | terminologySet | Update the terminology set's name and label fields | | ||
| | reference | terminologySet | Bind the terminology set to an opportunity (via `terminologySetId` on `POST /opportunities`) | | ||
| | manage | terminologySet | Full permissions including managing permission grants on the terminology set | | ||
|
|
||
| ### Proposal Permissions | ||
|
|
||
| Permissions granted directly against a proposal (using the proposal's `id` as | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At first glance there appears to be a circular reference (
TerminologySet.funderShortCodeandFunder.defaultTerminologySetId) but it is not really circular because there can be many TerminologySets created.I wonder, though, if we even need the TerminologySet to be associated with a
funderShortCode. Why should the definition of the terminology need to be associated with the funder? We have the user who created it, and perhaps the user can grant to the funder's organization the permissions to manage it. And we already have thedefaultTerminologySetIdonfunderand also aterminologySetIdon opportunity.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah this is valid third normal form for sure; it isn't circular because default is nullable.
We do need a schema-level (not just permission) association between terminology sets and funders because terminology sets are a by funders. Users are not a proxy for organization at the schema level, since a user's association with any given organization is permission based rather than schema based.
It might help to think in terms of UX:
defaultTerminologySetId.The user makes a selection, hits submit, and the opportunity is created.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've updated the API to remove any actual "use" of the default -- it is now just information for clients to leverage if they want.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The situation I am thinking of is this:
It seems to me that terminology (language) may be used by a particular organization but is not always particular to that organization.
We tend to avoid ownership in other cases so the alternative would be to use permissions (or lack thereof) rather than ownership. Like this:
The downside to this setup is change over time: a funder could not modify its existing terminology set and have that edit apply to all the things without going and touching all the things.
Therefore, having thought through it a bit more, it is not so bad to have the funder associated, with the exception that the funder's name will be visible to those who have access to that terminology set, when a funder may want to be a secret funder.