You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: custom/conf/app.example.ini
+6Lines changed: 6 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -2541,6 +2541,12 @@ LEVEL = Info
2541
2541
;; * no-sanitizer: Disable the sanitizer and render the content inside current page. It's **insecure** and may lead to XSS attack if the content contains malicious code.
2542
2542
;; * iframe: Render the content in a separate standalone page and embed it into current page by iframe. The iframe is in sandbox mode with same-origin disabled, and the JS code are safely isolated from parent page.
2543
2543
;RENDER_CONTENT_MODE=sanitized
2544
+
;;
2545
+
;; Whether post-process the rendered HTML content, including:
Copy file name to clipboardExpand all lines: models/user/user.go
+6-1Lines changed: 6 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -249,8 +249,13 @@ func (u *User) MaxCreationLimit() int {
249
249
}
250
250
251
251
// CanCreateRepoIn checks whether the doer(u) can create a repository in the owner
252
-
// NOTE: functions calling this assume a failure due to repository count limit; it ONLY checks the repo number LIMIT, if new checks are added, those functions should be revised
252
+
// NOTE: functions calling this assume a failure due to repository count limit, or the owner is not a real user.
253
+
// It ONLY checks the repo number LIMIT or whether owner user is real. If new checks are added, those functions should be revised.
254
+
// TODO: the callers can only return ErrReachLimitOfRepo, need to fine tune to support other error types in the future.
253
255
func (u*User) CanCreateRepoIn(owner*User) bool {
256
+
ifu.ID<=0||owner.ID<=0 {
257
+
returnfalse// fake user like Ghost or Actions user
0 commit comments