Improve users management through the CLI (#6001) (#10492)

* Fix images in wiki edit preview (#11546)

Make sure wiki editor sets wiki to true so gitea renders it as a wiki page.

Also change the context data attr for edit form. This looks wrong but everywhere else in our code assumes the urlPrefix to be just the repo url when rendering and manually adds /wiki to the rendered url regardless.

Fixes #11540
This commit is contained in:
ydelafollye authored and GitHub committed 2020-10-15 22:48:38 -04:00
1 parent 4fbe64572c
commit cb171dbd56
3 files changed
+121 -24

No files matched your search

+6
View File
@@ -235,6 +235,12 @@ func (u *User) GetEmail() string {
return u.Email
}
// GetAllUsers returns a slice of all users found in DB.
func GetAllUsers() ([]*User, error) {
users := make([]*User, 0)
return users, x.OrderBy("id").Find(&users)
}
// APIFormat converts a User to api.User
func (u *User) APIFormat() *api.User {
if u == nil {