From 07864392b8dbbe10afbf27761d5e2a58587e1ade Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Mon, 8 Nov 2021 10:45:04 +0800 Subject: [PATCH 1/5] update docs --- models/user.go | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/models/user.go b/models/user.go index 3ce23ef2ed534..31421bfc9ea63 100644 --- a/models/user.go +++ b/models/user.go @@ -131,14 +131,21 @@ type User struct { // Maximum repository creation limit, -1 means use global default MaxRepoCreation int `xorm:"NOT NULL DEFAULT -1"` - // Permissions - IsActive bool `xorm:"INDEX"` // Activate primary email - IsAdmin bool - IsRestricted bool `xorm:"NOT NULL DEFAULT false"` + // IsActive true: primary email is activated, user can access Web UI and Git SSH. + // false: an inactive user can only log in Web UI for account operations (ex: activate the account by email), no other access. + IsActive bool `xorm:"INDEX"` + // user is a Gitea admin, can access all repositories and admin pages + IsAdmin bool + // true: user is allowed to see only organizations/repositories that he has explicit rights specified + // (ex: in private Gitea instances user won't be allowed to see even organizations/repositories that are set as public) + IsRestricted bool `xorm:"NOT NULL DEFAULT false"` + AllowGitHook bool AllowImportLocal bool // Allow migrate repository by local path AllowCreateOrganization bool `xorm:"DEFAULT true"` - ProhibitLogin bool `xorm:"NOT NULL DEFAULT false"` + + // true: user is not allowed to log in Web UI. Git SSH access could still be allowed. + ProhibitLogin bool `xorm:"NOT NULL DEFAULT false"` // Avatar Avatar string `xorm:"VARCHAR(2048) NOT NULL"` From b5420160fe7a70c6c1e00ad17d6f84748dff8a85 Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Tue, 9 Nov 2021 09:56:57 +0800 Subject: [PATCH 2/5] Update models/user.go Co-authored-by: Gusted --- models/user.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/user.go b/models/user.go index 31421bfc9ea63..4dedfeb20f856 100644 --- a/models/user.go +++ b/models/user.go @@ -134,7 +134,7 @@ type User struct { // IsActive true: primary email is activated, user can access Web UI and Git SSH. // false: an inactive user can only log in Web UI for account operations (ex: activate the account by email), no other access. IsActive bool `xorm:"INDEX"` - // user is a Gitea admin, can access all repositories and admin pages + // user is a Gitea admin, who can access all repositories and the admin pages. IsAdmin bool // true: user is allowed to see only organizations/repositories that he has explicit rights specified // (ex: in private Gitea instances user won't be allowed to see even organizations/repositories that are set as public) From b116d0f222bc9412fc76cff90bf7faee6392b32d Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Tue, 9 Nov 2021 10:02:14 +0800 Subject: [PATCH 3/5] Update user.go --- models/user.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/models/user.go b/models/user.go index 4dedfeb20f856..64aae7186ca3b 100644 --- a/models/user.go +++ b/models/user.go @@ -134,9 +134,9 @@ type User struct { // IsActive true: primary email is activated, user can access Web UI and Git SSH. // false: an inactive user can only log in Web UI for account operations (ex: activate the account by email), no other access. IsActive bool `xorm:"INDEX"` - // user is a Gitea admin, who can access all repositories and the admin pages. + // the user is a Gitea admin, who can access all repositories and the admin pages. IsAdmin bool - // true: user is allowed to see only organizations/repositories that he has explicit rights specified + // true: the user is only allowed to see organizations/repositories that he/she has explicit rights to. // (ex: in private Gitea instances user won't be allowed to see even organizations/repositories that are set as public) IsRestricted bool `xorm:"NOT NULL DEFAULT false"` @@ -144,7 +144,7 @@ type User struct { AllowImportLocal bool // Allow migrate repository by local path AllowCreateOrganization bool `xorm:"DEFAULT true"` - // true: user is not allowed to log in Web UI. Git SSH access could still be allowed. + // true: the user is not allowed to log in Web UI. Git SSH access could still be allowed. ProhibitLogin bool `xorm:"NOT NULL DEFAULT false"` // Avatar From 054b35070e14b739235bbf8ca6e41adfe66e9bf7 Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Tue, 9 Nov 2021 10:30:35 +0800 Subject: [PATCH 4/5] Update user.go --- models/user.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/user.go b/models/user.go index 64aae7186ca3b..3cc50513d91db 100644 --- a/models/user.go +++ b/models/user.go @@ -136,7 +136,7 @@ type User struct { IsActive bool `xorm:"INDEX"` // the user is a Gitea admin, who can access all repositories and the admin pages. IsAdmin bool - // true: the user is only allowed to see organizations/repositories that he/she has explicit rights to. + // true: the user is only allowed to see organizations/repositories that they has explicit rights to. // (ex: in private Gitea instances user won't be allowed to see even organizations/repositories that are set as public) IsRestricted bool `xorm:"NOT NULL DEFAULT false"` From bb881a3f0feb30301f35b4ca4afd956a166f35a2 Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Tue, 9 Nov 2021 15:50:03 +0800 Subject: [PATCH 5/5] fix doc --- models/user.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/user.go b/models/user.go index 3cc50513d91db..68e3b3f9384a0 100644 --- a/models/user.go +++ b/models/user.go @@ -144,7 +144,7 @@ type User struct { AllowImportLocal bool // Allow migrate repository by local path AllowCreateOrganization bool `xorm:"DEFAULT true"` - // true: the user is not allowed to log in Web UI. Git SSH access could still be allowed. + // true: the user is not allowed to log in Web UI. Git/SSH access could still be allowed (please refer to Git/SSH access related code/documents) ProhibitLogin bool `xorm:"NOT NULL DEFAULT false"` // Avatar