[#228] Moving CernAuthorizationService class into cern-specific directory.

Open Jose Semedo requested to merge 228-open-source-preparation into master

Closes #228

According to: https://gitlab.cern.ch/push-notifications/notifications-design/-/issues/55

Backend:

  • Authentication and authorization (authorizationChecker.ts)
    • Extracts login and id from decodedtoken.cern_upn
    • Roles are coming from OAuth token decodedToken.resource_access...roles: INTERNAL_ROLE=internal, VIEWER_ROLE=viewer, SUPPORTER_ROLE=supporter.
  • Mattermost integration assumes Mattermost id = email
    • update-user-email.ts, upsert-mattermost-device.ts
  • CernPhone and mail2sms integration
    • interfaces or enable via config
  • cern-activedirectory.ts: to be made generic with config
  • group.ts
  • cern-authorization-service.ts
    • move to own folder
    • replace and make a generic group interface (configurable to use AD/LDAP module to extract groups and groups membership, or the authorization service to query Grappa.)
  • device.ts: DeviceSubType to move to config ? some require specific code. implement Interfaces ?
  • push-browser folder:
    • push-safari-sender.ts: update testSafariPush and note.urlArgs to use config
    • push-mattermost-sender.ts: update testMattermost to use config
    • push-browser-sender.ts: update testBrowserPush to use config
  • username-from-email.ts: CERN specific
  • app.ts: routingControllersToSpec strings to use config
Edited by Jose Semedo

Merge request reports