No option to make wikis editable for all users of codeberg (not only the project members) #28

Closed
opened 2019-02-04 22:13:39 +01:00 by ashimokawa · 4 comments
Image
Owner

This workes on github as the default, IIRC.

This workes on github as the default, IIRC.
Image
Owner
stalled upstream PR: https://github.com/go-gitea/gitea/pull/6312
Image

uff a stale one again ..., thanks for the ref. If one like to work on it, jsut checkout and create a new pull ...

uff a stale one again ..., thanks for the ref. If one like to work on it, jsut checkout and create a new pull ...
Image

I took the original PR, and updated it to the most recent codebase, and made it work not only for wikis owned by organizations, but by users too. The work in progress code is here.

Apart from code formatting, there are a few issues to iron out:

  • I need to review the review notes on the Gitea PR too, and adjust the code accordingly
    • Rather than a "globally_writeable" flag, repo_unit should have a "default permissions" column, with "none", "read", or "write" as possible options (defaulting to read). The UI would remain the same, and wouldn't expose "none" yet, just a "globally writeable" toggle for the wiki. The three-value column is more future proof, is all.
  • This needs a migration, adding the globally_writeable flag (or default_permissions) to repo_unit.
  • The permission check for user repos isn't great, it only works if there's only one repo unit marked globally writeable (which is the case now, but may not remain so in the future), that code needs a bit of a cleanup
  • Localization is borked
  • The option should only be available for public repos
  • Needs tests

Nevertheless, it's looking good, and I will be submitting a PR most likely later today.

I took the original PR, and updated it to the most recent codebase, and made it work not only for wikis owned by organizations, but by users too. The work in progress code is [here](https://codeberg.org/algernon/forgejo/src/branch/f/world-editable-wiki). Apart from code formatting, there are a few issues to iron out: - [x] I need to review the review notes on the Gitea PR too, and adjust the code accordingly - [x] Rather than a "globally_writeable" flag, `repo_unit` should have a "default permissions" column, with "none", "read", or "write" as possible options (defaulting to read). The UI would remain the same, and wouldn't expose "none" yet, just a "globally writeable" toggle for the wiki. The three-value column is more future proof, is all. - [x] This needs a migration, adding the `globally_writeable` flag (or `default_permissions`) to `repo_unit`. - [x] The permission check for user repos isn't great, it only works if there's only one repo unit marked globally writeable (which is the case *now*, but may not remain so in the future), that code needs a bit of a cleanup - [x] Localization is borked - [x] The option should only be available for public repos - [x] Needs tests Nevertheless, it's looking good, and I will be submitting a PR most likely later today.
Image
Owner

This has been resolved upstream and will be available soon.

This has been resolved upstream and will be available soon.
Image fnetX closed this issue 2023-12-30 19:17:13 +01:00
Sign in to join this conversation.
No milestone
No project
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Codeberg/Community#28
No description provided.