Can't change CanImportLocal in User Administration #2078

Closed
opened 2025-11-02 04:23:29 -06:00 by GiteaMirror · 7 comments
Owner

Originally created by @Cyber1000 on GitHub (Jul 20, 2018).

  • Gitea version (or commit ref): fe78154
  • Operating system: ubuntu (within docker)
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • [ x] No --> setting is within administration of users
    • Not relevant
  • Log gist:

Description

If I edit a user in administration view I can change the CanImportLocal flag, but after saving the flag vanishes ...
The message "Der Account „%s“ wurde aktualisiert." is a bug too, the message comes with %s, instead of the real user name.

Screenshots

image

Originally created by @Cyber1000 on GitHub (Jul 20, 2018). - Gitea version (or commit ref): fe78154 - Operating system: ubuntu (within docker) - Database (use `[x]`): - [ ] PostgreSQL - [x] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ x] No --> setting is within administration of users - [ ] Not relevant - Log gist: ## Description If I edit a user in administration view I can change the CanImportLocal flag, but after saving the flag vanishes ... The message "Der Account „%s“ wurde aktualisiert." is a bug too, the message comes with %s, instead of the real user name. ## Screenshots ![image](https://user-images.githubusercontent.com/1142765/43009976-76a6e0ce-8c3f-11e8-84d7-b8dc73bd6026.png)
GiteaMirror added the type/question label 2025-11-02 04:23:29 -06:00
Author
Owner

@techknowlogick commented on GitHub (Jul 20, 2018):

IMPORT_LOCAL_PATHS is likely set to false in app.ini (or not set at all which then defaults to false). Please set to true, and try again. More information here: https://docs.gitea.io/en-us/config-cheat-sheet/

@techknowlogick commented on GitHub (Jul 20, 2018): `IMPORT_LOCAL_PATHS` is likely set to false in app.ini (or not set at all which then defaults to false). Please set to true, and try again. More information here: https://docs.gitea.io/en-us/config-cheat-sheet/
Author
Owner

@Cyber1000 commented on GitHub (Jul 20, 2018):

IMPORT_LOCAL_PATHS wasn't set. It seems that if the user is a administrator it always automatically gets the default of IMPORT_LOCAL_PATHS.

Now if IMPORT_LOCAL_PATHS=true and I deselect CanImportLocal on a administrative user, it gets selected again automatically when saving. On a normal user I can switch between true and false now. Is this intended behavior?

@Cyber1000 commented on GitHub (Jul 20, 2018): IMPORT_LOCAL_PATHS wasn't set. It seems that if the user is a administrator it always automatically gets the default of IMPORT_LOCAL_PATHS. Now if IMPORT_LOCAL_PATHS=true and I deselect CanImportLocal on a administrative user, it gets selected again automatically when saving. On a normal user I can switch between true and false now. Is this intended behavior?
Author
Owner

@lafriks commented on GitHub (Aug 10, 2018):

Yes that is intended behaviour

@lafriks commented on GitHub (Aug 10, 2018): Yes that is intended behaviour
Author
Owner

@Cyber1000 commented on GitHub (Aug 23, 2018):

Sorry to answer so late, but it's still a little bit strange to me that I check checkboxes, save the site, it says "Account was updated" and afterwards I find that a checkbox has magically rechanged it's flag. A deactivated checkbox or an error-message on saving would be more conclusive for the user.

Also the "Der Account „%s“ wurde aktualisiert." with the %s within doesn't sound to be intended. Seems like the accountname wasn't but in the string properly.

Thanks!

@Cyber1000 commented on GitHub (Aug 23, 2018): Sorry to answer so late, but it's still a little bit strange to me that I check checkboxes, save the site, it says "Account was updated" and afterwards I find that a checkbox has magically rechanged it's flag. A deactivated checkbox or an error-message on saving would be more conclusive for the user. Also the "Der Account „%s“ wurde aktualisiert." with the %s within doesn't sound to be intended. Seems like the accountname wasn't but in the string properly. Thanks!
Author
Owner

@jxsl13 commented on GitHub (Sep 12, 2018):

Still persists: The message "Der Account „%s“ wurde aktualisiert." is a bug too, the message comes with %s, instead of the real user name.

Seems to be this line, where no username is being added to the string: 801843b011/routers/admin/users.go (L229)

@jxsl13 commented on GitHub (Sep 12, 2018): Still persists: The message "Der Account „%s“ wurde aktualisiert." is a bug too, the message comes with %s, instead of the real user name. Seems to be this line, where no username is being added to the string: https://github.com/go-gitea/gitea/blob/801843b0115e29ba2304fa6a5bea1ae169a58e02/routers/admin/users.go#L229
Author
Owner

@Cyber1000 commented on GitHub (Oct 2, 2018):

Ok thanks, perhaps I'll have a look at it, when I'm having more time. At least it is a minor bug ...

@Cyber1000 commented on GitHub (Oct 2, 2018): Ok thanks, perhaps I'll have a look at it, when I'm having more time. At least it is a minor bug ...
Author
Owner

@kolaente commented on GitHub (Jun 2, 2019):

@Cyber1000 @jxsl13 I've approved the correct translation on crowdin, it should land in Gitea with the next sync of locales.

@kolaente commented on GitHub (Jun 2, 2019): @Cyber1000 @jxsl13 I've approved the correct translation on crowdin, it should land in Gitea with the next sync of locales.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#2078