Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new util to update connections #45

Open
fratzinger opened this issue Oct 11, 2021 · 0 comments
Open

new util to update connections #45

fratzinger opened this issue Oct 11, 2021 · 0 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@fratzinger
Copy link
Owner

brought up in #34 (thanks @robbyphillips!) we need a way to recalculate abilities on connections. Something like:

//pseudocode
import assignAbilityToConnection from "feathers-casl";

const userId = context.params.user?.id;
if (!userId) { return }
const ability = createAbility(...);

assignAbilityToConnection(ability, (connection) => {
  return connection.user?.id === userId
});

@fratzinger fratzinger added documentation Improvements or additions to documentation enhancement New feature or request labels Oct 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant