]> git.r.bdr.sh - rbdr/mobius/blobdiff - hotline/access.go
Add config option to specify ignored filename patterns
[rbdr/mobius] / hotline / access.go
index 69bf53ee62a17cbbffb53101c7d74b9684521fce..1bee72c00b4046c159e3a01b88768d00b24b68df 100644 (file)
@@ -6,8 +6,6 @@ import (
 )
 
 const (
-       accessAlwaysAllow = -1 // Some transactions are always allowed
-
        // File System Maintenance
        accessDeleteFile   = 0
        accessUploadFile   = 1
@@ -35,15 +33,15 @@ const (
        accessCannotBeDiscon = 23
        accessGetClientInfo  = 24
        accessUploadAnywhere = 25
-       // accessAnyName          = 26
+       accessAnyName        = 26
        // accessNoAgreement      = 27
-       // accessSetFileComment   = 28
-       // accessSetFolderComment = 29
-       accessViewDropBoxes = 30
-       accessMakeAlias     = 31
-       accessBroadcast     = 32
-       accessNewsDeleteArt = 33
-       accessNewsCreateCat = 34
+       accessSetFileComment   = 28
+       accessSetFolderComment = 29
+       accessViewDropBoxes    = 30
+       accessMakeAlias        = 31
+       accessBroadcast        = 32
+       accessNewsDeleteArt    = 33
+       accessNewsCreateCat    = 34
        // accessNewsDeleteCat    = 35
        accessNewsCreateFldr = 36
        // accessNewsDeleteFldr   = 37
@@ -58,9 +56,6 @@ func (bits *accessBitmap) Set(i int) {
 // authorize checks if 64 bit access slice contain has accessBit set
 // TODO: refactor to use accessBitmap type
 func authorize(access *[]byte, accessBit int) bool {
-       if accessBit == accessAlwaysAllow {
-               return true
-       }
        bits := big.NewInt(int64(binary.BigEndian.Uint64(*access)))
 
        return bits.Bit(63-accessBit) == 1