mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 12:37:14 -04:00 
			
		
		
		
	Refactor Actions Token Access (#35688)
* use a single function to do Action Tokens Permission checks * allows easier customization * add basic tests * lfs file locks should work now --------- Signed-off-by: ChristopherHX <christopher.homberger@web.de> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
		| @@ -48,17 +48,16 @@ func IsGiteaActionsUserName(name string) bool { | ||||
| // NewActionsUser creates and returns a fake user for running the actions. | ||||
| func NewActionsUser() *User { | ||||
| 	return &User{ | ||||
| 		ID:                      ActionsUserID, | ||||
| 		Name:                    ActionsUserName, | ||||
| 		LowerName:               ActionsUserName, | ||||
| 		IsActive:                true, | ||||
| 		FullName:                "Gitea Actions", | ||||
| 		Email:                   ActionsUserEmail, | ||||
| 		KeepEmailPrivate:        true, | ||||
| 		LoginName:               ActionsUserName, | ||||
| 		Type:                    UserTypeBot, | ||||
| 		AllowCreateOrganization: true, | ||||
| 		Visibility:              structs.VisibleTypePublic, | ||||
| 		ID:               ActionsUserID, | ||||
| 		Name:             ActionsUserName, | ||||
| 		LowerName:        ActionsUserName, | ||||
| 		IsActive:         true, | ||||
| 		FullName:         "Gitea Actions", | ||||
| 		Email:            ActionsUserEmail, | ||||
| 		KeepEmailPrivate: true, | ||||
| 		LoginName:        ActionsUserName, | ||||
| 		Type:             UserTypeBot, | ||||
| 		Visibility:       structs.VisibleTypePublic, | ||||
| 	} | ||||
| } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user