clinical:collaborations

v2.4.0Published 7 years ago

This package has not had recent updates. Please investigate it's current state before committing to using it in your project.

clinical:collaborations

Collaboration based security architecture (similar to Roles and Friends) using a bottom-up collaboration model.

Circle CI

========================================

Installation

meteor add clinical:collaborations

========================================

Collaboration Schema

1{
2  _id: { type: String, optional: true },
3  slug: { type: String, optional: true },
4  isUnlisted: { type: Boolean },
5  name: { type: String, optional: true, unique: true },
6  description: { type: String, optional: true },
7  collaborators: { type: [String] },
8  administrators: { type: [String] },
9  invitations: { type: [String], optional: true },
10  requests: { type: [String], optional: true },
11  requiresAdministratorApprovalToJoin: { type: Boolean, autoform: { label: "" } }
12}

========================================

Creating a Collaboration

1Collaborations.create({
2  name: "SampleCollab",
3  description: "Lorem ipsum...",
4  isUnlisted: false,
5  requiresAdministratorApproval: false,
6  collaborators: ['janedoe@test.org'],
7  administrators: ['janedoe@test.org'],
8  invitations: [],
9  requests: []
10})

========================================

Filtering Publications to include Associated Collaborations

1Meteor.publish("studies", function (studyId) {
2  var associatedCollaborations = Meteor.users.findOne({username: "camron"}).getAssociatedCollaborations();
3  return Studies.findOne({
4    collaborations: {$in: associatedCollaborations}
5  });
6});

========================================

Collaboration Object

For the latest API specs, please visit http://clinical-docs.meteor.com

1  Collaboration.save();
2  Collaboration.getSelected(properties);
3  Collaboration.getUrl(collaborationName);
4  Collaboration.removeCollaborator(emailAddress);
5  Collaboration.addCollaborator(emailAddress);
6  Collaboration.addCollaborators(collaboratorsInputString);
7  Collaboration.addAdministrator(emailAddress);
8  Collaboration.addAdministrators(administratorsInputString);
9  Collaboration.removeAdministrator(emailAddress);
10  Collaboration.hasMember(emailAddress);
11  Collaboration.hasApplied(emailAddress);
12  Collaboration.getNames();
13  Collaboration.getCollaboratorsGraph();
14  Collaboration.getExtendedGraph();
15  Collaboration.getCollaborators();
16
17  // client
18  Collaboration.create();
19  Collaboration.getNames();
20  Collaboration.upsertCompleted();
21  Collaboration.upsertFinished();
22
23  // server
24  Collaboration.parseCookies();
25  Collaboration.lookupToken();
26  Collaboration.fetchToken();

========================================

Server Methods

1  Meteor.call('/collaboration/create');
2  Meteor.call('/collaboration/join');
3  Meteor.call('/collaboration/apply');
4  Meteor.call('/collaboration/leave');

========================================

Collaboration Testing Scenario

The clinical:collaborations package uses the following security scenario for testing and verification testing. It should be stressed that a bottom-up collaboration model is used; meaning the users associated with the collaboration at the 'top' of the model have the least access to individual projects, but the widest influence. This is not a command-and-control hierarchy. It's is a distributed collaboration network.

security-schema

Given the above security scenario should result in the following record access for each collaborator: resulting-access

========================================

Acknowledgements

This package was funded through the gracious support of the UC Santa Cruz Medbook team.

========================================

Licensing

MIT License