check-from-v0.53.0-role.td 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. # Copyright Materialize, Inc. and contributors. All rights reserved.
  2. #
  3. # Use of this software is governed by the Business Source License
  4. # included in the LICENSE file at the root of this repository.
  5. #
  6. # As of the Change Date specified in that file, in accordance with
  7. # the Business Source License, use of this software will be governed
  8. # by the Apache License, Version 2.0.
  9. $ skip-if
  10. SELECT mz_version_num() < 5200 OR mz_version_num() >= 8300;
  11. > SELECT name FROM mz_roles;
  12. group
  13. joe
  14. mz_system
  15. mz_support
  16. materialize
  17. superuser_login
  18. "space role"
  19. $ postgres-execute connection=postgres://superuser_login:some_bogus_password@${testdrive.materialize-sql-addr}
  20. SELECT 1;
  21. > SELECT name FROM mz_roles WHERE name = 'joe' OR name = 'group';
  22. joe
  23. group
  24. > SELECT role.name AS role, member.name AS member, grantor.name AS grantor FROM mz_role_members membership LEFT JOIN mz_roles role ON membership.role_id = role.id LEFT JOIN mz_roles member ON membership.member = member.id LEFT JOIN mz_roles grantor ON membership.grantor = grantor.id;
  25. group joe mz_system
  26. $ postgres-execute connection=postgres://mz_system@${testdrive.materialize-internal-sql-addr}/materialize
  27. DROP ROLE superuser_login;
  28. DROP ROLE "space role";
  29. DROP ROLE joe;
  30. DROP ROLE group;