-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactoring and permission integration tests for images
- Loading branch information
Showing
16 changed files
with
230 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,19 @@ | ||
// Initializes the `images` service on path `/images` | ||
const createService = require('./images.class.js'); | ||
const hooks = require('./images.hooks'); | ||
import hooks from './images.hooks' | ||
const createService = require('./images.class.js') | ||
|
||
module.exports = function (app) { | ||
// Initialize our service with any options it requires | ||
app.use('/images', createService({ | ||
app, | ||
name: 'images', | ||
})); | ||
app.use( | ||
'/images', | ||
createService({ | ||
app, | ||
name: 'images', | ||
}) | ||
) | ||
|
||
// Get our initialized service so that we can register hooks | ||
const service = app.service('images'); | ||
const service = app.service('images') | ||
|
||
service.hooks(hooks); | ||
}; | ||
service.hooks(hooks) | ||
} |
17 changes: 17 additions & 0 deletions
17
src/services/images/resources/imageRedactionPolicyWebApp.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# yaml-language-server: $schema=../../../schema/common/redactionPolicy.json | ||
name: image-redaction-policy | ||
items: | ||
- jsonPath: $.title | ||
valueConverterName: redact | ||
- jsonPath: $.article.[*].title | ||
valueConverterName: redact | ||
- jsonPath: $.article.[*].excerpt | ||
valueConverterName: redact | ||
- jsonPath: $.article.[*].content | ||
valueConverterName: redact | ||
- jsonPath: $.regions.[*].iiifFragment | ||
valueConverterName: contextNotAllowedImage | ||
- jsonPath: $.pages.[*].iiifThumbnail | ||
valueConverterName: contextNotAllowedImage | ||
- jsonPath: $.pages.[*].iiif | ||
valueConverterName: contextNotAllowedImage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.