@@ -405,7 +405,6 @@ REVOKE SecTest.Viewer ON SecTest.Customer;
405405SHOW ACCESS ON SecTest.Customer;
406406/
407407
408-
409408-- ############################################################################
410409-- PART 6: USER ROLES (CREATE/ALTER/DROP)
411410-- ############################################################################
@@ -420,7 +419,7 @@ SHOW ACCESS ON SecTest.Customer;
420419/**
421420 * Create a user role and assign a single module role.
422421 */
423- CREATE USER ROLE RegularUser (System.User, SecTest.User);
422+ CREATE or modify USER ROLE RegularUser (System.User, SecTest.User);
424423/
425424
426425-- ============================================================================
@@ -430,7 +429,7 @@ CREATE USER ROLE RegularUser (System.User, SecTest.User);
430429/**
431430 * A user role can include roles from multiple modules.
432431 */
433- CREATE USER ROLE PowerUser (System.User, SecTest.User, SecTest.Administrator);
432+ CREATE or modify USER ROLE PowerUser (System.User, SecTest.User, SecTest.Administrator);
434433/
435434
436435-- ============================================================================
@@ -440,7 +439,7 @@ CREATE USER ROLE PowerUser (System.User, SecTest.User, SecTest.Administrator);
440439/**
441440 * Admin user role that can manage all roles.
442441 */
443- CREATE USER ROLE SuperAdmin (System.Administrator, SecTest.Administrator) MANAGE ALL ROLES;
442+ CREATE or modify USER ROLE SuperAdmin (System.Administrator, SecTest.Administrator) MANAGE ALL ROLES;
444443/
445444
446445-- Verify
@@ -526,7 +525,7 @@ SHOW DEMO USERS;
526525/**
527526 * Create a basic demo user with a single user role.
528527 */
529- CREATE DEMO USER 'sectest_user' PASSWORD 'Password1!' (RegularUser);
528+ CREATE or modify DEMO USER 'sectest_user' PASSWORD 'Password1!' (RegularUser);
530529/
531530
532531-- ============================================================================
@@ -536,7 +535,7 @@ CREATE DEMO USER 'sectest_user' PASSWORD 'Password1!' (RegularUser);
536535/**
537536 * Create a demo user with multiple user roles.
538537 */
539- CREATE DEMO USER 'sectest_admin' PASSWORD 'Admin123!' (RegularUser, SuperAdmin);
538+ CREATE or modify DEMO USER 'sectest_admin' PASSWORD 'Admin123!' (RegularUser, SuperAdmin);
540539/
541540
542541-- Verify
@@ -615,12 +614,4 @@ SHOW ACCESS ON PAGE SecTest.Customer_Overview;
615614SHOW ACCESS ON PAGE SecTest.Order_Overview;
616615/
617616
618- -- ============================================================================
619- -- PART 10: RESET SECURITY LEVEL
620- -- ============================================================================
621- -- Security examples demonstrated PRODUCTION-level features. Reset to OFF so
622- -- subsequent doctype scripts (pages, microflows) don't require allowed roles.
623- -- This is test cleanup, not avoidance — each script should restore global state.
624617
625- ALTER PROJECT SECURITY LEVEL OFF;
626- /
0 commit comments