You are not logged in.
Pages: 1
I'm looking at the Group Access Rights and they are like
grp.AccessRights := '14,3-256,0,3-256,0,3-256,0,3-256,0';
What does the 14 mean, the 3-256 mean, etc.
I searched and couldn't find an explanation anywhere in the documentation.
Offline
The text maps TSQLAccessRights content.
They follow its fields, as detailed in http://synopse.info/files/html/api-1.18 … CESSRIGHTS
So 14 maps AllowRemoteExecute, 3-256 maps GET, and so on.
procedure TSQLAccessRights.FromString(P: PUTF8Char);
begin
FillcharFast(self,sizeof(self),0);
if P=nil then
exit;
AllowRemoteExecute := TSQLAllowRemoteExecute(byte(GetNextItemCardinal(P)));
SetBitCSV(GET,MAX_SQLTABLES,P);
SetBitCSV(POST,MAX_SQLTABLES,P);
SetBitCSV(PUT,MAX_SQLTABLES,P);
SetBitCSV(DELETE,MAX_SQLTABLES,P);
end;
function TSQLAccessRights.ToString: RawUTF8;
begin
result := FormatUTF8('%,%,%,%,%',
[Byte(AllowRemoteExecute),
GetBitCSV(GET,MAX_SQLTABLES), GetBitCSV(POST,MAX_SQLTABLES),
GetBitCSV(PUT,MAX_SQLTABLES), GetBitCSV(DELETE,MAX_SQLTABLES)]);
end;
Offline
I've figured out almost everything else I need, but this escapes me.
14 maps AllowRemoteExecute to what? It's not function #14. Why is it not 13, or 12. What does 14 mean?
Also, the CRUD numbers - I'm assuming a bitfield for 0-256 tables ordered from the database tables.
So I tried an experiment:
// grp.AccessRights was = '14,3-256,0,3-256,0,3-256,0,3-256,0';
grp.SQLAccessRights.Edit(1, True, false, false, false);
TSQLLog.Add.Log(sllTrace, 'accessrights % ', [UTF8toString(grp.AccessRights)]);
to see how the bits get changed. But they didn't.
20161124 16542458 res SynSQLite3.TSQLDatabase(027CAC30) [{"ID":5,"Ident":"EWBlogin","SessionTimeout":60,"AccessRights":"14,3-256,0,3-256,0,3-256,0,3-256,0"}]
20161124 16542717 trace accessrights 14,3-256,0,3-256,0,3-256,0,3-256,0
No change. So I clearly don't understand this.
Thanks in advance
Erick
Offline
Thanks, I have it figured out now.
Offline
Pages: 1