feat: make user settings links config driven #1990

Merged
konrad merged 1 commits from dpschen/frontend:feature/feat-make-links-config-driven into main 2022-05-22 15:03:10 +00:00
Member

I'm not really sure if this is really an improvement, since it removes flexibility…
Since I did it I wanted to share it anyway.

I'm not really sure if this is really an improvement, since it removes flexibility… Since I did it I wanted to share it anyway.
dpschen added 1 commit 2022-05-21 15:47:32 +00:00
continuous-integration/drone/pr Build is passing Details
dbe1276e23
feat: make user settings links config driven
Author
Member

One thing that I realized while doing this is:

We should extract these functions that tell if a user is able to do something / access somewhere as guards and use the same ones e.g. as guard in vue-router.

=> less duplication.

One thing that I realized while doing this is: We should extract these functions that tell if a user is able to do something / access somewhere as guards and use the same ones e.g. as guard in vue-router. => less duplication.
Owner

We should extract these functions that tell if a user is able to do something / access somewhere as guards and use the same ones e.g. as guard in vue-router.

That sounds like a good idea. I think there's no way around duplicating the logic behind this with the rights management code in the api?

> We should extract these functions that tell if a user is able to do something / access somewhere as guards and use the same ones e.g. as guard in vue-router. That sounds like a good idea. I think there's no way around duplicating the logic behind this with the rights management code in the api?
Author
Member

Yes, since we should test access in frontend before showing something that won't load because the user doesn't have the right to load it I also don't see any way around. (Writing the obvious here).

It would be good if we could keep it as close as possible.
There are ways to sync this of course but I have never done something like this.

Yes, since we should test access in frontend before showing something that won't load because the user doesn't have the right to load it I also don't see any way around. (Writing the obvious here). It would be good if we could keep it as close as possible. There are ways to sync this of course but I have never done something like this.
Member

Hi dpschen!

Thank you for creating a PR!

I've deployed the changes of this PR on a preview environment under this URL: https://1990-feature-feat-make-links-config-d--vikunja-frontend-preview.netlify.app

You can use this url to view the changes live and test them out.
You will need to manually connect this to an api running somehwere. The easiest to use is https://try.vikunja.io/.

Have a nice day!

Beep boop, I'm a bot.

Hi dpschen! Thank you for creating a PR! I've deployed the changes of this PR on a preview environment under this URL: https://1990-feature-feat-make-links-config-d--vikunja-frontend-preview.netlify.app You can use this url to view the changes live and test them out. You will need to manually connect this to an api running somehwere. The easiest to use is https://try.vikunja.io/. Have a nice day! > Beep boop, I'm a bot.
Owner

There's the rights header which we're using to show or hide edit buttons on entities, but that won't work for things like getting all lists at once where the right is different for each list.

There's the [rights header](https://try.vikunja.io/api/v1/docs#section/Rights) which we're using to show or hide edit buttons on entities, but that won't work for things like getting all lists at once where the right is different for each list.
konrad approved these changes 2022-05-22 15:03:04 +00:00
konrad merged commit 6bab1088c7 into main 2022-05-22 15:03:10 +00:00
konrad deleted branch feature/feat-make-links-config-driven 2022-05-22 15:03:10 +00:00
This repo is archived. You cannot comment on pull requests.
No description provided.