Skip to content

Commit

Permalink
Merge pull request #246 from oslokommune/develop
Browse files Browse the repository at this point in the history
Realse 2.0.0-rc.5
  • Loading branch information
aulonm authored Mar 1, 2021
2 parents d2fc2dd + 7b127c8 commit 013f0d7
Show file tree
Hide file tree
Showing 9 changed files with 36 additions and 4 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@ All notable changes to this project will be documented in this file. The format

## Unreleased

## [2.0.0-rc.5] 2021-03-01

### Added

- Dev-environment for users outside of Oslo kommune to test our application before forking/using
- Show User UID in profile
- Custom personalized sign in text for the keycloak sign-in button (default is `Sign in with keycloak`, new environment variable)

# Fixed

- Firestore rules: KeyRes were only allowed for uid-objects and not email-objects

## [2.0.0-rc.4] 2021-02-19

### BREAKING CHANGE
Expand Down Expand Up @@ -39,6 +51,7 @@ All notable changes to this project will be documented in this file. The format
## [2.0.0-rc.3] 2021-01-26

### BREAKING CHANGE

- Drop IE 11 support

### Added
Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# OKR Tracker

- [Demo](#demo)
- [Project requirements](#project-requirements)
- [Clone and install](#clone-and-install)
- [Set up new instance](#set-up-new-instance)
Expand Down Expand Up @@ -27,6 +28,13 @@
- [Supported Providers](#supported-providers)
- [Keycloak integration](#keycloak-integration)

## Demo

If you would like to check out how the application works, you can go to the demo-site and sign in with a test-user

- Site: https://origo-okr-tracker.web.app
- User/pass: [email protected] / testuser

## Project requirements

- Node 14.x
Expand Down Expand Up @@ -106,6 +114,7 @@ Get your Firebase SDK snippet from your [Firebase Console](https://console.fireb
| `VUE_APP_KEYCLOAK_CLIENT_ID` | _from keycloak server_ (if keycloak provided to `VUE_APP_LOGIN_PROVIDERS`) |
| `VUE_APP_KEYCLOAK_LOGOUT_URL` | Where to redirect user after sign out (if keycloak provided to `VUE_APP_LOGIN_PROVIDERS`) |
| `VUE_APP_KEYCLOAK_ERROR_URL` | Where to redirect user when error signing in (if keycloak provided to `VUE_APP_LOGIN_PROVIDERS`) |
| `VUE_APP_KEYCLOAK_SIGN_IN_TEXT` | A specialized text if you want the keycloak sign in button to say something else than 'keycloak' |

### Link project

Expand Down
2 changes: 1 addition & 1 deletion firestore.rules
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ service cloud.firestore {
}

function isMemberOfKeyResParent(document) {
let oldUser = /databases/$(database)/documents/users/$(request.auth.token.uid) in getAfter(get(/databases/$(database)/documents/keyResults/$(document)).data.parent).data.team;
let oldUser = /databases/$(database)/documents/users/$(request.auth.token.email) in getAfter(get(/databases/$(database)/documents/keyResults/$(document)).data.parent).data.team;
let newUser = /databases/$(database)/documents/users/$(request.auth.token.uid) in getAfter(get(/databases/$(database)/documents/keyResults/$(document)).data.parent).data.team;
return oldUser || newUser;
}
Expand Down
1 change: 1 addition & 0 deletions functions/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules/
.runtimeconfig.json
origo-okr-tracker-private-key.json
okr-tracker-production-private-key.json
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "okr-tracker",
"version": "2.0.0-rc.4",
"version": "2.0.0-rc.5",
"private": true,
"scripts": {
"dev": "firebase emulators:start --import=./mock & vue-cli-service serve",
Expand Down
2 changes: 1 addition & 1 deletion src/components/Modal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export default {
timestamp: new Date(this.date),
});
this.$toasted.show(this.$t('toaster.add.progression'));
} catch {
} catch (e) {
this.$toasted.error(this.$t('toaster.error.progression'));
}
this.loading = false;
Expand Down
1 change: 1 addition & 0 deletions src/locale/locales/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@
"requestAccess": "Request access",
"requestButton": "Send request",
"backToLogin": "Back to login",
"with": "Sign in with {provider} user",
"google": "Sign in with Google",
"keycloak": "Sign in with Keycloak",
"email": "Email",
Expand Down
1 change: 1 addition & 0 deletions src/locale/locales/nb-NO.json
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@
"requestAccess": "Be om tilgang",
"requestButton": "Send forespørsel",
"backToLogin": "Tilbake til innlogging",
"with": "Logg inn med {provider} bruker",
"google": "Logg inn med Google",
"keycloak": "Logg inn med Keycloak",
"email": "E-post",
Expand Down
9 changes: 8 additions & 1 deletion src/views/Login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
data-cy="login-username"
@click="loginWithKeycloak"
>
{{ $t('login.keycloak') }}
{{ getKeycloakText }}
</button>

<button
Expand Down Expand Up @@ -105,6 +105,13 @@ export default {
computed: {
...mapState(['user', 'loginError', 'providers', 'keycloak', 'authenticated', 'loginLoading']),
getKeycloakText() {
if (process.env.VUE_APP_KEYCLOAK_SIGN_IN_TEXT) {
return this.$t('login.with', { provider: process.env.VUE_APP_KEYCLOAK_SIGN_IN_TEXT });
}
return this.$t('login.keycloak');
},
},
watch: {
Expand Down

0 comments on commit 013f0d7

Please sign in to comment.