10 lines
256 B
MySQL
10 lines
256 B
MySQL
|
CREATE OR REPLACE DEFINER=`root`@`localhost`
|
||
|
SQL SECURITY DEFINER
|
||
|
VIEW `account`.`myRole`
|
||
|
AS SELECT `r`.`inheritsFrom` AS `id`
|
||
|
FROM (
|
||
|
`account`.`roleRole` `r`
|
||
|
JOIN `account`.`user` `u` ON(`u`.`role` = `r`.`role`)
|
||
|
)
|
||
|
WHERE `u`.`id` = `myUser_getId`()
|