...
CREATE TABLE `NODE_ACCESS_REQUIREMENT` (
`SUBJECT_ID` bigint(20) NOT NULL,
`SUBJECT_TYPE` enum('ENTITY','EVALUATION','TEAM') NOT NULL,
`REQUIREMENT_ID` bigint(20) NOT NULL,
PRIMARY KEY (`SUBJECT_ID`,`SUBJECT_TYPE`,`REQUIREMENT_ID`),
KEY `SUBJECT_ACCESS_REQUIREMENT_REQUIREMENT_ID_FK` (`REQUIREMENT_ID`),
CONSTRAINT `SUBJECT_ACCESS_REQUIREMENT_REQUIREMENT_ID_FK` FOREIGN KEY (`REQUIREMENT_ID`) REFERENCES `ACCESS_REQUIREMENT` (`ID`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
Current Workflow
Will only discuss Web client workflow since we are deprecating scripts that are using these services.ACT member used to create AccessRequirements via a script. We are deprecating the script and encouraging users to use the web client implementation.
Creating an AccessRequirement and applying it to an entity works as following:
- An ACT member navigates to a subject A (entity or team) that they want to apply new AccessRequirement to.
- S/he creates an AccessRequirement B for the subject, setting up the terms, and specifying all requirements.
- Later new data C is added to Synapse.
- An ACT member determines that the new data should have the same AccessRequirement with A. S/he navigates to A and list A's AccessRequirement to find the one they are looking for.
- S/he changes the existing AccessRequirement, extends it to also apply to C.
For team, currently, we haven't exposed the ability to create an AccessRequirement at the team's place. User still navigate to an entity's AccessRequirement to find the "Create new AccessRequirement" button.
Problems
Currently, each AccessRequirement can be applied to multiple subjects. Every time a subject is added or removed from the AccessRequirement, the AccessRequirement is updated. Since applying an AccessRequirement to a subject is a relationship between AccessRequirement and subject, adding or removing subjects from AccessRequirement should only change the relationship between the subjects and the AccessRequirement, and do not update the AccessRequirement.
...