You are not logged in.
Pages: 1
It doesn't seem that easy to set up the AuthGroup table rights. Would it be worth adding a function like below to TSQLAuthGroup?
procedure TSQLAuthGroup.EditTableRights(TableIndex: integer; C, R, U, D: boolean);
var
A: TSQLAccessRights;
begin
A := SQLAccessRights;
if not C then
Exclude(A.PUT, TableIndex);
if not R then
Exclude(A.GET, TableIndex);
if not U then
Exclude(A.POST, TableIndex);
if not D then
Exclude(A.DELETE, TableIndex);
SQLAccessRights := A;
end;
Offline
Good idea.
But your implementation won't work, e.g. if you set access rights after having disabled it (e.g. C=true after C=false).
And also you made a confusion between POST=Create=Add and PUT=Update
And it will be a bit slow at the TSQLAuthGroup level.
I've re-declared TSQLAccessRights record as an object, and added some dedicated methods: FromString, ToString, Edit.
Offline
Thanks for such a quick response.
Offline
Pages: 1