mirror of
				https://github.com/go-gitea/gitea
				synced 2025-11-04 05:18:25 +00:00 
			
		
		
		
	Update User model comments about permissions (#17583)
				
					
				
			This commit is contained in:
		@@ -131,13 +131,20 @@ type User struct {
 | 
				
			|||||||
	// Maximum repository creation limit, -1 means use global default
 | 
						// Maximum repository creation limit, -1 means use global default
 | 
				
			||||||
	MaxRepoCreation int `xorm:"NOT NULL DEFAULT -1"`
 | 
						MaxRepoCreation int `xorm:"NOT NULL DEFAULT -1"`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// Permissions
 | 
						// IsActive true: primary email is activated, user can access Web UI and Git SSH.
 | 
				
			||||||
	IsActive                bool `xorm:"INDEX"` // Activate primary email
 | 
						// 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"`
 | 
				
			||||||
 | 
						// the user is a Gitea admin, who can access all repositories and the admin pages.
 | 
				
			||||||
	IsAdmin bool
 | 
						IsAdmin bool
 | 
				
			||||||
 | 
						// 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"`
 | 
						IsRestricted bool `xorm:"NOT NULL DEFAULT false"`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	AllowGitHook            bool
 | 
						AllowGitHook            bool
 | 
				
			||||||
	AllowImportLocal        bool // Allow migrate repository by local path
 | 
						AllowImportLocal        bool // Allow migrate repository by local path
 | 
				
			||||||
	AllowCreateOrganization bool `xorm:"DEFAULT true"`
 | 
						AllowCreateOrganization bool `xorm:"DEFAULT true"`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						// 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"`
 | 
						ProhibitLogin bool `xorm:"NOT NULL DEFAULT false"`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// Avatar
 | 
						// Avatar
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user