check-from-v0.83.0-role.td 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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() < 8300;
  11. > SELECT name FROM mz_roles;
  12. anonymous_http_user
  13. group
  14. joe
  15. mz_analytics
  16. mz_monitor
  17. mz_monitor_redacted
  18. mz_system
  19. mz_support
  20. materialize
  21. superuser_login
  22. "space role"
  23. $ postgres-execute connection=postgres://superuser_login:some_bogus_password@${testdrive.materialize-sql-addr}
  24. SELECT 1;
  25. > SELECT name FROM mz_roles WHERE name = 'joe' OR name = 'group';
  26. joe
  27. group
  28. > 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;
  29. group joe mz_system
  30. $ postgres-execute connection=postgres://mz_system@${testdrive.materialize-internal-sql-addr}/materialize
  31. DROP ROLE superuser_login;
  32. DROP ROLE "space role";
  33. DROP ROLE joe;
  34. DROP ROLE group;