authsome merge requestshttps://gitlab.coko.foundation/pubsweet/authsome/-/merge_requests2016-08-04T10:31:39Zhttps://gitlab.coko.foundation/pubsweet/authsome/-/merge_requests/1Example/prototype Journal mode2016-08-04T10:31:39ZJureExample/prototype Journal modehttps://gitlab.coko.foundation/pubsweet/authsome/-/merge_requests/2Modularity for modes, for easier extensibility.2016-11-06T22:35:51ZJureModularity for modes, for easier extensibility.https://gitlab.coko.foundation/pubsweet/authsome/-/merge_requests/3Add test mode2017-04-13T11:34:50ZJureAdd test modeThis is the new mode used for testing basic CRUD operations in `pubsweet-server`.This additionally adds a todo-ish comment to `blog_mode.js` containing authorization related tests that have to be moved here.This is the new mode used for testing basic CRUD operations in `pubsweet-server`.This additionally adds a todo-ish comment to `blog_mode.js` containing authorization related tests that have to be moved here.https://gitlab.coko.foundation/pubsweet/authsome/-/merge_requests/4Add CI config to run tests and lint2017-08-30T13:32:47ZTamlyn RhodesAdd CI config to run tests and lint- Add Gitlab CI config
- Update eslint config
- Remove stray console.log- Add Gitlab CI config
- Update eslint config
- Remove stray console.loghttps://gitlab.coko.foundation/pubsweet/authsome/-/merge_requests/5Transpile to ES5 before publishing package2017-09-18T14:04:32ZTamlyn RhodesTranspile to ES5 before publishing package- Add Babel build script.
- Add auth modes as properties of Authsome class.- Add Babel build script.
- Add auth modes as properties of Authsome class.https://gitlab.coko.foundation/pubsweet/authsome/-/merge_requests/6Async support2017-09-20T11:26:36ZJureAsync supporthttps://gitlab.coko.foundation/pubsweet/authsome/-/merge_requests/7Release 0.0.7@next2017-09-20T11:32:24ZJureRelease 0.0.7@nexthttps://gitlab.coko.foundation/pubsweet/authsome/-/merge_requests/8Ignore coverage when publishing2017-09-20T11:52:21ZTamlyn RhodesIgnore coverage when publishingAlso remove npm lock file.Also remove npm lock file.https://gitlab.coko.foundation/pubsweet/authsome/-/merge_requests/10Bump version2017-10-11T08:50:20ZJureBump versionhttps://gitlab.coko.foundation/pubsweet/authsome/-/merge_requests/11Fix non-admin access2017-10-11T10:53:42ZTamlyn RhodesFix non-admin access- Allow everyone to view collections unfiltered
- Whitelist fragments property of collections- Allow everyone to view collections unfiltered
- Whitelist fragments property of collectionshttps://gitlab.coko.foundation/pubsweet/authsome/-/merge_requests/12Bump version2017-10-11T14:58:10ZJureBump versionhttps://gitlab.coko.foundation/pubsweet/authsome/-/merge_requests/9Update blog mode2017-10-13T12:35:09ZTamlyn RhodesUpdate blog mode- Load user from DB on demand
- Improve test coverage
- Fix some inconsistencies
- Update yarn and babel config to support object spread- Load user from DB on demand
- Improve test coverage
- Fix some inconsistencies
- Update yarn and babel config to support object spreadhttps://gitlab.coko.foundation/pubsweet/authsome/-/merge_requests/13Whitelist 'type' property2017-10-13T15:30:29ZTamlyn RhodesWhitelist 'type' propertyNeeded when checking permissions on clientNeeded when checking permissions on clienthttps://gitlab.coko.foundation/pubsweet/authsome/-/merge_requests/15Add support for specific queries2018-03-13T14:33:45ZJureAdd support for specific queriesAdds support for modes of this format:
```
module.exports = {
'submit review': async function (userId, operation, object, context) {
const user = await context.models.User.find(userId)
return user.name === 'User One' && object...Adds support for modes of this format:
```
module.exports = {
'submit review': async function (userId, operation, object, context) {
const user = await context.models.User.find(userId)
return user.name === 'User One' && object.title === 'Book by User One'
}
}
```
A REST example would be e.g.:
```
module.exports = {
GET: (userId, operation, object, context) => {
const mode = new XpubCollabraRESTMode(...arguments)
return mode.result()
},
POST: (userId, operation, object, context) => {
return false
},
PATCH: (userId, operation, object, context) => {
return false
},
DELETE: (userId, operation, object, context) => {
return false
},
}
```
The new mode format is a way to address specific authorization questions that come with GraphQL (e.g. 'submit review') in a clear manner. Old modes are supported, no breaking changes.
Any operation/query that isn't supported defaults to returning false.https://gitlab.coko.foundation/pubsweet/authsome/-/merge_requests/16Bump version2018-03-13T14:43:36ZJureBump versionPublished as `authsome 0.0.10` under the 'next' tag on NPM.Published as `authsome 0.0.10` under the 'next' tag on NPM.https://gitlab.coko.foundation/pubsweet/authsome/-/merge_requests/14feat: ensure truthy results always have a `filter` property2018-03-13T15:40:05ZTamlyn Rhodesfeat: ensure truthy results always have a `filter` property- Makes conditional checks easier in consumers
- Also change git repo URL to be navigable from npm- Makes conditional checks easier in consumers
- Also change git repo URL to be navigable from npmhttps://gitlab.coko.foundation/pubsweet/authsome/-/merge_requests/17feat: add support for default handler2018-03-29T16:18:39ZJurefeat: add support for default handlerhttps://gitlab.coko.foundation/pubsweet/authsome/-/merge_requests/18chore: bump version to 0.1.02018-03-29T16:22:31ZJurechore: bump version to 0.1.0https://gitlab.coko.foundation/pubsweet/authsome/-/merge_requests/19Update README.md2018-04-15T18:59:38ZJureUpdate README.mdWould love to get some feedback on these documentation changes. @tamlyn, @alexgeo, you were the ones most exposed to Authsome and its quirks, could you comment on the docs, and if they make sense now?Would love to get some feedback on these documentation changes. @tamlyn, @alexgeo, you were the ones most exposed to Authsome and its quirks, could you comment on the docs, and if they make sense now?https://gitlab.coko.foundation/pubsweet/authsome/-/merge_requests/20Add license. Closes #3.2018-05-28T06:38:21ZJureAdd license. Closes #3.