mirror of
				https://github.com/superseriousbusiness/gotosocial.git
				synced 2025-10-29 04:22:24 -05:00 
			
		
		
		
	[feature] make account sign-up / backlog limits configurable (#3768)
This commit is contained in:
		
					parent
					
						
							
								ce7ba8f498
							
						
					
				
			
			
				commit
				
					
						787bdc1488
					
				
			
		
					 9 changed files with 151 additions and 36 deletions
				
			
		|  | @ -1132,6 +1132,56 @@ func GetAccountsReasonRequired() bool { return global.GetAccountsReasonRequired( | |||
| // SetAccountsReasonRequired safely sets the value for global configuration 'AccountsReasonRequired' field | ||||
| func SetAccountsReasonRequired(v bool) { global.SetAccountsReasonRequired(v) } | ||||
| 
 | ||||
| // GetAccountsRegistrationDailyLimit safely fetches the Configuration value for state's 'AccountsRegistrationDailyLimit' field | ||||
| func (st *ConfigState) GetAccountsRegistrationDailyLimit() (v int) { | ||||
| 	st.mutex.RLock() | ||||
| 	v = st.config.AccountsRegistrationDailyLimit | ||||
| 	st.mutex.RUnlock() | ||||
| 	return | ||||
| } | ||||
| 
 | ||||
| // SetAccountsRegistrationDailyLimit safely sets the Configuration value for state's 'AccountsRegistrationDailyLimit' field | ||||
| func (st *ConfigState) SetAccountsRegistrationDailyLimit(v int) { | ||||
| 	st.mutex.Lock() | ||||
| 	defer st.mutex.Unlock() | ||||
| 	st.config.AccountsRegistrationDailyLimit = v | ||||
| 	st.reloadToViper() | ||||
| } | ||||
| 
 | ||||
| // AccountsRegistrationDailyLimitFlag returns the flag name for the 'AccountsRegistrationDailyLimit' field | ||||
| func AccountsRegistrationDailyLimitFlag() string { return "accounts-registration-daily-limit" } | ||||
| 
 | ||||
| // GetAccountsRegistrationDailyLimit safely fetches the value for global configuration 'AccountsRegistrationDailyLimit' field | ||||
| func GetAccountsRegistrationDailyLimit() int { return global.GetAccountsRegistrationDailyLimit() } | ||||
| 
 | ||||
| // SetAccountsRegistrationDailyLimit safely sets the value for global configuration 'AccountsRegistrationDailyLimit' field | ||||
| func SetAccountsRegistrationDailyLimit(v int) { global.SetAccountsRegistrationDailyLimit(v) } | ||||
| 
 | ||||
| // GetAccountsRegistrationBacklogLimit safely fetches the Configuration value for state's 'AccountsRegistrationBacklogLimit' field | ||||
| func (st *ConfigState) GetAccountsRegistrationBacklogLimit() (v int) { | ||||
| 	st.mutex.RLock() | ||||
| 	v = st.config.AccountsRegistrationBacklogLimit | ||||
| 	st.mutex.RUnlock() | ||||
| 	return | ||||
| } | ||||
| 
 | ||||
| // SetAccountsRegistrationBacklogLimit safely sets the Configuration value for state's 'AccountsRegistrationBacklogLimit' field | ||||
| func (st *ConfigState) SetAccountsRegistrationBacklogLimit(v int) { | ||||
| 	st.mutex.Lock() | ||||
| 	defer st.mutex.Unlock() | ||||
| 	st.config.AccountsRegistrationBacklogLimit = v | ||||
| 	st.reloadToViper() | ||||
| } | ||||
| 
 | ||||
| // AccountsRegistrationBacklogLimitFlag returns the flag name for the 'AccountsRegistrationBacklogLimit' field | ||||
| func AccountsRegistrationBacklogLimitFlag() string { return "accounts-registration-backlog-limit" } | ||||
| 
 | ||||
| // GetAccountsRegistrationBacklogLimit safely fetches the value for global configuration 'AccountsRegistrationBacklogLimit' field | ||||
| func GetAccountsRegistrationBacklogLimit() int { return global.GetAccountsRegistrationBacklogLimit() } | ||||
| 
 | ||||
| // SetAccountsRegistrationBacklogLimit safely sets the value for global configuration 'AccountsRegistrationBacklogLimit' field | ||||
| func SetAccountsRegistrationBacklogLimit(v int) { global.SetAccountsRegistrationBacklogLimit(v) } | ||||
| 
 | ||||
| // GetAccountsAllowCustomCSS safely fetches the Configuration value for state's 'AccountsAllowCustomCSS' field | ||||
| func (st *ConfigState) GetAccountsAllowCustomCSS() (v bool) { | ||||
| 	st.mutex.RLock() | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue