mirror of
				https://github.com/binwiederhier/ntfy.git
				synced 2025-10-31 13:02:24 +01:00 
			
		
		
		
	Replace read/write flags with Permission
This commit is contained in:
		
							parent
							
								
									1733323132
								
							
						
					
					
						commit
						4b9d40464c
					
				
					 13 changed files with 194 additions and 152 deletions
				
			
		server
|  | @ -1,6 +1,7 @@ | |||
| package server | ||||
| 
 | ||||
| import ( | ||||
| 	"heckel.io/ntfy/user" | ||||
| 	"io/fs" | ||||
| 	"net/netip" | ||||
| 	"time" | ||||
|  | @ -66,8 +67,7 @@ type Config struct { | |||
| 	CacheBatchSize                       int | ||||
| 	CacheBatchTimeout                    time.Duration | ||||
| 	AuthFile                             string | ||||
| 	AuthDefaultRead                      bool | ||||
| 	AuthDefaultWrite                     bool | ||||
| 	AuthDefault                          user.Permission | ||||
| 	AttachmentCacheDir                   string | ||||
| 	AttachmentTotalSizeLimit             int64 | ||||
| 	AttachmentFileSizeLimit              int64 | ||||
|  | @ -127,8 +127,7 @@ func NewConfig() *Config { | |||
| 		CacheBatchSize:                       0, | ||||
| 		CacheBatchTimeout:                    0, | ||||
| 		AuthFile:                             "", | ||||
| 		AuthDefaultRead:                      true, | ||||
| 		AuthDefaultWrite:                     true, | ||||
| 		AuthDefault:                          user.NewPermission(true, true), | ||||
| 		AttachmentCacheDir:                   "", | ||||
| 		AttachmentTotalSizeLimit:             DefaultAttachmentTotalSizeLimit, | ||||
| 		AttachmentFileSizeLimit:              DefaultAttachmentFileSizeLimit, | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 binwiederhier
						binwiederhier