cleanup+categorization of TODOs
This commit is contained in:
@ -170,7 +170,7 @@ call create_journal('RbacRole');
|
||||
|
||||
create type RbacRoleDescriptor as
|
||||
(
|
||||
objectTable varchar(63), -- TODO: needed? remove?
|
||||
objectTable varchar(63), -- for human readability and easier debugging
|
||||
objectUuid uuid,
|
||||
roleType RbacRoleType
|
||||
);
|
||||
@ -221,7 +221,7 @@ declare
|
||||
objectUuidOfRole uuid;
|
||||
roleUuid uuid;
|
||||
begin
|
||||
-- TODO: extract function toRbacRoleDescriptor(roleIdName varchar) + find other occurrences
|
||||
-- TODO.refact: extract function toRbacRoleDescriptor(roleIdName varchar) + find other occurrences
|
||||
roleParts = overlay(roleIdName placing '#' from length(roleIdName) + 1 - strpos(reverse(roleIdName), '.'));
|
||||
objectTableFromRoleIdName = split_part(roleParts, '#', 1);
|
||||
objectNameFromRoleIdName = split_part(roleParts, '#', 2);
|
||||
@ -415,7 +415,7 @@ create or replace function isGranted(granteeIds uuid[], grantedId uuid)
|
||||
declare
|
||||
granteeId uuid;
|
||||
begin
|
||||
-- TODO: needs optimization
|
||||
-- TODO.perf: needs optimization
|
||||
foreach granteeId in array granteeIds
|
||||
loop
|
||||
if isGranted(granteeId, grantedId) then
|
||||
|
@ -30,7 +30,7 @@ begin
|
||||
insert
|
||||
into RbacGrants (grantedByRoleUuid, ascendantUuid, descendantUuid, assumed)
|
||||
values (grantedByRoleUuid, userUuid, roleUuid, doAssume);
|
||||
-- TODO: What should happen on mupltiple grants? What if options are not the same?
|
||||
-- TODO.spec: What should happen on mupltiple grants? What if options (doAssume) are not the same?
|
||||
-- Most powerful or latest grant wins? What about managed?
|
||||
-- on conflict do nothing; -- allow granting multiple times
|
||||
end; $$;
|
||||
@ -53,7 +53,7 @@ begin
|
||||
insert
|
||||
into RbacGrants (grantedByRoleUuid, ascendantUuid, descendantUuid, assumed)
|
||||
values (grantedByRoleUuid, userUuid, grantedRoleUuid, doAssume);
|
||||
-- TODO: What should happen on mupltiple grants? What if options are not the same?
|
||||
-- TODO.spec: What should happen on mupltiple grants? What if options (doAssume) are not the same?
|
||||
-- Most powerful or latest grant wins? What about managed?
|
||||
-- on conflict do nothing; -- allow granting multiple times
|
||||
end; $$;
|
||||
|
@ -30,7 +30,7 @@ create or replace function hasGlobalPermission(op RbacOp)
|
||||
returns boolean
|
||||
language sql as
|
||||
$$
|
||||
-- TODO: this could to be optimized
|
||||
-- TODO.perf: this could to be optimized
|
||||
select (select uuid from global) in
|
||||
(select queryAccessibleObjectUuidsOfSubjectIds(op, 'global', currentSubjectsUuids()));
|
||||
$$;
|
||||
|
@ -152,7 +152,7 @@ drop view if exists test_customer_iv;
|
||||
create or replace view test_customer_iv as
|
||||
select target.uuid, target.prefix as idName
|
||||
from test_customer as target;
|
||||
-- TODO: Is it ok that everybody has access to this information?
|
||||
-- TODO.spec: Is it ok that everybody has access to this information?
|
||||
grant all privileges on test_customer_iv to restricted;
|
||||
|
||||
/*
|
||||
|
@ -168,7 +168,7 @@ drop view if exists test_domain_iv;
|
||||
create or replace view test_domain_iv as
|
||||
select distinct target.uuid, target.name as idName
|
||||
from test_domain as target;
|
||||
-- TODO: Is it ok that everybody has access to this information?
|
||||
-- TODO.spec: Is it ok that everybody has access to this information?
|
||||
grant all privileges on test_domain_iv to restricted;
|
||||
|
||||
/*
|
||||
|
@ -9,7 +9,7 @@ create table if not exists hs_admin_contact
|
||||
uuid uuid unique references RbacObject (uuid),
|
||||
label varchar(96) not null,
|
||||
postalAddress text,
|
||||
emailAddresses text, -- TODO: change to json
|
||||
phoneNumbers text -- TODO: change to json
|
||||
emailAddresses text, -- TODO.feat: change to json
|
||||
phoneNumbers text -- TODO.feat: change to json
|
||||
);
|
||||
--//
|
||||
|
@ -139,7 +139,7 @@ execute procedure deleteRbacRulesForHsAdminContact();
|
||||
create or replace view hs_admin_contact_iv as
|
||||
select target.uuid, cleanIdentifier(target.label) as idName
|
||||
from hs_admin_contact as target;
|
||||
-- TODO: Is it ok that everybody has access to this information?
|
||||
-- TODO.spec: Is it ok that everybody has access to this information?
|
||||
grant all privileges on hs_admin_contact_iv to restricted;
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user