9 accessAlwaysAllow = -1 // Some transactions are always allowed
11 // File System Maintenance
14 accessDownloadFile = 2 // Can Download Files
17 accessCreateFolder = 5
18 accessDeleteFolder = 6
19 accessRenameFolder = 7
24 // accessCloseChat = 12 // Documented but unused?
25 // accessShowInList = 13 // Documented but unused?
30 // accessChangeOwnPass = 18 // Documented but unused?
31 // accessSendPrivMsg = 19 // This doesn't do what it seems like it should do. TODO: Investigate
32 accessNewsReadArt = 20
33 accessNewsPostArt = 21
34 accessDisconUser = 22 // Toggles red user name in user list
35 accessCannotBeDiscon = 23
36 accessGetClientInfo = 24
37 // accessUploadAnywhere = 25
39 // accessNoAgreement = 27
40 // accessSetFileComment = 28
41 // accessSetFolderComment = 29
42 // accessViewDropBoxes = 30
45 accessNewsDeleteArt = 33
46 accessNewsCreateCat = 34
47 // accessNewsDeleteCat = 35
48 accessNewsCreateFldr = 36
49 // accessNewsDeleteFldr = 37
52 type accessBitmap [8]byte
54 func (bits *accessBitmap) Set(i int) {
55 bits[i/8] |= 1 << uint(7-i%8)
58 // authorize checks if 64 bit access slice contain has accessBit set
59 // TODO: refactor to use accessBitmap type
60 func authorize(access *[]byte, accessBit int) bool {
61 if accessBit == accessAlwaysAllow {
64 bits := big.NewInt(int64(binary.BigEndian.Uint64(*access)))
66 return bits.Bit(63-accessBit) == 1