code cleanup: remove unnecessary "raise notice"

This commit is contained in:
Michael Hoennig 2022-10-20 10:53:47 +02:00
parent e2b6986d2b
commit 22bca20c49
3 changed files with 0 additions and 10 deletions

View File

@ -259,9 +259,6 @@ begin
roleTypeFromRoleIdName = split_part(roleParts, '#', 3); roleTypeFromRoleIdName = split_part(roleParts, '#', 3);
objectUuidOfRole = findObjectUuidByIdName(objectTableFromRoleIdName, objectNameFromRoleIdName); objectUuidOfRole = findObjectUuidByIdName(objectTableFromRoleIdName, objectNameFromRoleIdName);
raise notice $sql$findObjectUuidByIdName('%', '%') = %;$sql$, objectTableFromRoleIdName, objectNameFromRoleIdName, objectUuidOfRole;
raise notice 'finding %, % (%), %', objectTableFromRoleIdName, objectNameFromRoleIdName, objectUuidOfRole, roleTypeFromRoleIdName;
select uuid select uuid
from RbacRole from RbacRole
where objectUuid = objectUuidOfRole where objectUuid = objectUuidOfRole
@ -406,7 +403,6 @@ declare
refId uuid; refId uuid;
permissionIds uuid[] = array []::uuid[]; permissionIds uuid[] = array []::uuid[];
begin begin
raise notice 'createPermission for: % %', forObjectUuid, permitOps;
if (forObjectUuid is null) then if (forObjectUuid is null) then
raise exception 'forObjectUuid must not be null'; raise exception 'forObjectUuid must not be null';
end if; end if;
@ -418,7 +414,6 @@ begin
loop loop
refId = (select uuid from RbacPermission where objectUuid = forObjectUuid and op = permitOps[i]); refId = (select uuid from RbacPermission where objectUuid = forObjectUuid and op = permitOps[i]);
if (refId is null) then if (refId is null) then
raise notice 'createPermission: % %', forObjectUuid, permitOps[i];
insert insert
into RbacReference ("type") into RbacReference ("type")
values ('RbacPermission') values ('RbacPermission')
@ -427,11 +422,9 @@ begin
into RbacPermission (uuid, objectUuid, op) into RbacPermission (uuid, objectUuid, op)
values (refId, forObjectUuid, permitOps[i]); values (refId, forObjectUuid, permitOps[i]);
end if; end if;
raise notice 'addPermission: %', refId;
permissionIds = permissionIds || refId; permissionIds = permissionIds || refId;
end loop; end loop;
raise notice 'createPermissions returning: %', permissionIds;
return permissionIds; return permissionIds;
end; end;
$$; $$;
@ -559,7 +552,6 @@ $$;
create or replace procedure grantPermissionsToRole(roleUuid uuid, permissionIds uuid[]) create or replace procedure grantPermissionsToRole(roleUuid uuid, permissionIds uuid[])
language plpgsql as $$ language plpgsql as $$
begin begin
raise notice 'grantPermissionsToRole: % -> %', roleUuid, permissionIds;
if cardinality(permissionIds) = 0 then return; end if; if cardinality(permissionIds) = 0 then return; end if;
for i in array_lower(permissionIds, 1)..array_upper(permissionIds, 1) for i in array_lower(permissionIds, 1)..array_upper(permissionIds, 1)

View File

@ -55,7 +55,6 @@ declare
userUuid uuid; userUuid uuid;
grantedByRoleUuid uuid; grantedByRoleUuid uuid;
begin begin
raise notice 'will createRole for %', roleDescriptor;
roleUuid := createRole(roleDescriptor); roleUuid := createRole(roleDescriptor);
if cardinality(permissions) >0 then if cardinality(permissions) >0 then

View File

@ -36,7 +36,6 @@ begin
custRowId = uuid_generate_v4(); custRowId = uuid_generate_v4();
custAdminName = 'customer-admin@' || custPrefix || '.example.com'; custAdminName = 'customer-admin@' || custPrefix || '.example.com';
raise notice 'creating customer %:%', custReference, custPrefix;
insert insert
into test_customer (reference, prefix, adminUserName) into test_customer (reference, prefix, adminUserName)
values (custReference, custPrefix, custAdminName); values (custReference, custPrefix, custAdminName);