zorn-v / nextcloud-social-login

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

Preload Discord Roles #422

Open kousu opened 10 months ago

kousu commented 10 months ago

Once https://github.com/zorn-v/nextcloud-social-login/pull/395 is merged, expand it by adding a "Load Discord Roles" button to the UI.

Discord will not hand out Discord roles through the API except to guild members, so this will have to trigger a download.

Once that's done, replace the free form text field on the left here

with a <select> that lists the Discord roles by name.

(remember that Discord roles can change name at any time, so internally, continue to use role IDs)

pktiuk commented 5 months ago

That's a pretty good idea.
Checking role ID-s is a bit tedious

pktiuk commented 4 weeks ago

I wanted to try to implement this feature, but tbh I am way too bad ad PHP to deal with this.

Changing frontend part is really simple.

My Vue code ```git diff --git a/src/components/settings/GroupMapping.vue b/src/components/settings/GroupMapping.vue index 9f14d1d..6fae07b 100644 --- a/src/components/settings/GroupMapping.vue +++ b/src/components/settings/GroupMapping.vue @@ -3,7 +3,18 @@ {{ t(appName, 'Add group mapping') }}
+ + +