X-Git-Url: https://git.r.bdr.sh/rbdr/mobius/blobdiff_plain/aebc4d3647b9823ae8cbb57b21b1af83bfd011fb..21581958c38861f3a62ef7c27d0a8a6f4db2a1f8:/hotline/access.go diff --git a/hotline/access.go b/hotline/access.go index 8d6dd63..f2e904d 100644 --- a/hotline/access.go +++ b/hotline/access.go @@ -6,8 +6,6 @@ import ( ) const ( - accessAlwaysAllow = -1 // Some transactions are always allowed - // File System Maintenance accessDeleteFile = 0 accessUploadFile = 1 @@ -34,16 +32,16 @@ const ( accessDisconUser = 22 // Toggles red user name in user list accessCannotBeDiscon = 23 accessGetClientInfo = 24 - // accessUploadAnywhere = 25 + accessUploadAnywhere = 25 // 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