weblate icon indicating copy to clipboard operation
weblate copied to clipboard

Can't edit built-in groups, roles

Open burner1024 opened this issue 2 years ago • 4 comments

Describe the issue

https://docs.weblate.org/no/latest/admin/access.html#automatic-group-assignments

Automatic group assignment to Users and Viewers is always recreated when upgrading from one Weblate version to another. If you want to turn it off, set the regular expression to ^$ (which won’t match anything).

Except you can't. There's no option to edit built-in groups, nor roles.

I already tried

  • [X] I've read and searched the documentation.
  • [X] I've searched for similar issues in this repository.

Steps to reproduce the behavior

  1. Go to admin area.
  2. Click on groups, then Users
  3. It can't be edited.

Expected behavior

No response

Screenshots

Captura de pantalla de 2022-05-06 13-42-52 Captura de pantalla de 2022-05-06 13-43-03

Exception traceback

No response

How do you run Weblate?

Docker container

Weblate versions

docker-compose 4.12.1

Weblate deploy checks

No response

Additional context

No response

burner1024 avatar May 06 '22 06:05 burner1024

This issue has been automatically marked as stale because there wasn’t any recent activity.

It will be closed soon if no further action occurs.

Thank you for your contributions!

github-actions[bot] avatar May 17 '22 02:05 github-actions[bot]

here's some activity...

burner1024 avatar May 17 '22 09:05 burner1024

It behaves this way since 4ad9dc9796de9648705427fc8af58b2b9f8f82e8. Unfortunately, you can't make automatic assignment editable while not allowing editing of the group itself in the Django admin interface (or at least I don't see a way to do that).

nijel avatar May 18 '22 15:05 nijel

@nijel What is the current way to edit the Guests group then ? In particular, what's the new way to give permission to anonymous users ? https://docs.weblate.org/no/latest/admin/access.html#list-of-groups seems outdated

hippalectryon-0 avatar Jul 06 '22 07:07 hippalectryon-0

Would love to be able to modify the default roles, because I want to restrict access to the source strings for any registered user. I can't create a role without that permission and set it in the automatic group assignment, because the Users role is forced to be assigned and can't be modified. Can't disable automatic group assignment on it too to add a custom role. Can't remove it from users too.

MasterIO02 avatar Aug 15 '22 23:08 MasterIO02

Thank you for your report; the issue you have reported has just been fixed.

  • In case you see a problem with the fix, please comment on this issue.
  • In case you see a similar problem, please open a separate issue.
  • If you are happy with the outcome, don’t hesitate to support Weblate by making a donation.

github-actions[bot] avatar Aug 24 '22 13:08 github-actions[bot]

Hello. I found this issue and decided to reuse it instead of creating a new one. I'm using Weblate 4.18.2 which is running in a docker container. When I try to change anything for the default role Users via the Dashboard and then press Save - nothing happens. I've tried to add / remove the roles, change the languages it has access to, and also to edit the regex expression for the automatic group assignment. Neither of these changes are saved when I press the Save button, and after refreshing the page the values are back to default. Django dashboard shows that it's not possible to change anything for the Users group, even though it was mentioned above that some of the settings can now be changed for the default groups. Is there something I'm missing or is this functionality not working properly?

benq66 avatar Jul 13 '23 14:07 benq66

Django interface does not support this, use /manage/teams/ for that.

nijel avatar Jul 13 '23 14:07 nijel

Apologies for not making that clear, the Dashboard that I've mentioned is the /manage/teams/ page. After the changes didn't work there I checked the Django dashboard to try and apply the required changes, but that didn't work either. I'm able to create new groups and change the settings for them without problems, but the default groups do not save the changes.

Here's an example of trying to change the automatic assignment rule for Users. Save button doesn't do anything after pressing it and after manually refreshing the page the values are back to default.

weblate_users

benq66 avatar Jul 13 '23 14:07 benq66

This should work, and it works for me in both Firefox and Chrome. Do you have any browser extensions that might be affecting this? Any errors in the browser console or server log?

nijel avatar Jul 15 '23 11:07 nijel

I've checked the logs for the docker container via docker-compose logs (the environment variables for logging are set to WEBLATE_DEBUG=1, WEBLATE_LOGLEVEL=DEBUG). I can see the entries about changing something for a custom group and pressing Save:

weblate_1   | 2023-07-15T12:36:41.045462440Z nginx stdout | ip - - [15/Jul/2023:12:36:41 +0000] "GET /teams/9/ HTTP/1.1" 200 15982 "https://weblate.address.com" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36"
weblate_1   | 2023-07-15T12:36:46.477944346Z nginx stdout | ip - - [15/Jul/2023:12:36:46 +0000] "POST /teams/9/ HTTP/1.1" 302 5 "https://weblate.address.com" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36"
weblate_1   | 2023-07-15T12:36:46.799604006Z nginx stdout | ip - - [15/Jul/2023:12:36:46 +0000] "GET /teams/9/ HTTP/1.1" 200 15977 "https://weblate.address.com" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36"

However, there's no POST request or any other related entries when I try to change the Users group and press Save:

weblate_1   | 2023-07-15T12:40:57.664818059Z nginx stdout | ip - - [15/Jul/2023:12:40:57 +0000] "GET /manage/teams/ HTTP/1.1" 200 19245 "https://weblate.address.com" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36"
weblate_1   | 2023-07-15T12:41:02.019499826Z nginx stdout | ip - - [15/Jul/2023:12:41:02 +0000] "GET /teams/3/ HTTP/1.1" 200 24342 "https://weblate.address.com" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36"

I've tried to do this operation via Chrome + incognito mode, then Edge + incognito mode. I've asked a colleague to try the same (change some stuff for Users and then Save), but he said that the button doesn't do anything for him either.

We've also looked at the browser console log and the network log, and there's no indications about something being blocked or not working when I and the colleague press the Save button.

There's one thing that might be a possible cause to this - the instance we're running is not a fresh install of the latest version, we've upgraded some time ago from a version that didn't have this functionality yet (something between 4.11 and 4.13 if I'm not mistaken). Is there some config or a database entry that we can check that maybe wasn't properly updated during the upgrade?

benq66 avatar Jul 15 '23 13:07 benq66

Okay, after messing up with the database for some time I managed to manually change the required values the hard way. Thank you for suggestions.

benq66 avatar Jul 15 '23 18:07 benq66

What you describe really looks like #8605, but that was fixed in 4.15.1.

nijel avatar Jul 17 '23 08:07 nijel

Anyway, this just shows why it's bad to comment on a closed issue. The problem is entirely different (the form does not submit, vs. there is no editing interface). If you want to continue in the discussion, please open a separate issue so that the original reporters do not get notified about things they are not interested in.

nijel avatar Jul 17 '23 08:07 nijel