Add new tests and update schema.sql and account permissions
New test files for database functionalities like transfer of ownership, schema conditions, and updating roles have been added. Changes have also been made in the schema.sql file for checking the role hierarchy levels and updating rules for permissions. Modifications in account permissions test have also been performed for more accuracy.
This commit is contained in:
@@ -8,9 +8,25 @@ select has_table('public', 'accounts', 'Makerkit accounts table should exist');
|
||||
select has_table('public', 'accounts_memberships', 'Makerkit account_users table should exist');
|
||||
select has_table('public', 'invitations', 'Makerkit invitations table should exist');
|
||||
select has_table('public', 'billing_customers', 'Makerkit billing_customers table should exist');
|
||||
select has_table('public', 'subscriptions', 'Makerkit billing_subscriptions table should exist');
|
||||
select has_table('public', 'subscriptions', 'Makerkit subscriptions table should exist');
|
||||
select has_table('public', 'subscription_items', 'Makerkit subscription_items table should exist');
|
||||
select has_table('public', 'orders', 'Makerkit orders table should exist');
|
||||
select has_table('public', 'order_items', 'Makerkit order_items table should exist');
|
||||
select has_table('public', 'roles', 'Makerkit roles table should exist');
|
||||
select has_table('public', 'role_permissions', 'Makerkit roles_permissions table should exist');
|
||||
|
||||
select tests.rls_enabled('public', 'config');
|
||||
select tests.rls_enabled('public', 'accounts');
|
||||
select tests.rls_enabled('public', 'accounts_memberships');
|
||||
select tests.rls_enabled('public', 'invitations');
|
||||
select tests.rls_enabled('public', 'billing_customers');
|
||||
select tests.rls_enabled('public', 'subscriptions');
|
||||
select tests.rls_enabled('public', 'subscription_items');
|
||||
select tests.rls_enabled('public', 'orders');
|
||||
select tests.rls_enabled('public', 'order_items');
|
||||
select tests.rls_enabled('public', 'roles');
|
||||
select tests.rls_enabled('public', 'role_permissions');
|
||||
|
||||
SELECT schema_privs_are('public', 'anon', Array [NULL], 'Anon should not have access to public schema');
|
||||
|
||||
-- set the role to anonymous for verifying access tests
|
||||
|
||||
Reference in New Issue
Block a user