zorn-v / nextcloud-social-login

GNU Affero General Public License v3.0
198 stars 137 forks source link

Limit login to groups #396

Closed kousu closed 1 year ago

kousu commented 1 year ago

In my team we have a general #announcements channel in Discord for our followers, and then most of the work is kept in private channels behind a Coordinators role. I've been doing https://github.com/zorn-v/nextcloud-social-login/issues/390 because I want to map Coordinators on Discord to Coordinators on NextCloud. I've used the "Allow login only for specified guilds" to limit the blast radius, but it would be even better if I could also "Allow login only for the specified roles".

So that's my feature request.

Maybe this isn't something that should be solved in your plugin. Maybe we should reserve Discord for our core members and find a different medium for announcements. But if I could solve it here that would simplify my life.

zorn-v commented 1 year ago

Maybe this isn't something that should be solved in your plugin

It is. I can't invent how to resolve your edge case in general way.

kousu commented 1 year ago

I just noticed these settings

  • [ ] Restrict login for users without mapped groups
  • [ ] Restrict login for users without assigned groups

e.g.

Screenshot 2023-02-15 at 14-42-36 Social login - Administration settings - Yielding Opportunities for Terpsichore's Art

I overlooked them because at the moment I can't use them because there's no way to set up group mappings for Discord (or GitHub, Slack, Telegram, etc) -- basically only generic OIDC and Discourse can do it. These should solve my problem, once I get #390 finished; I just have to make sure to not map the groups I don't want to log in, which seems like what you'd obviously do anyway.

Sorry for the noise, and thanks for the very useful plugin.