villebro commented on a change in pull request #10674:
URL: 
https://github.com/apache/incubator-superset/pull/10674#discussion_r477147322



##########
File path: superset/security/manager.py
##########
@@ -609,15 +619,67 @@ def sync_role_definitions(self) -> None:
         self.set_role("granter", self._is_granter_pvm)
         self.set_role("sql_lab", self._is_sql_lab_pvm)
 
-        if conf.get("PUBLIC_ROLE_LIKE_GAMMA", False):
-            self.set_role("Public", self._is_gamma_pvm)
+        if conf["PUBLIC_ROLE_LIKE"]:
+            self.copy_role(conf["PUBLIC_ROLE_LIKE"], self.auth_role_public, 
merge=True)

Review comment:
       To be super accomodating, we could do something like
   ```python
   if conf.get("PUBLIC_ROLE_LIKE_GAMMA", False):
       logger.warning("The config `PUBLIC_ROLE_LIKE_GAMMA` is deprecated and 
will be removed in Superset 1.0. Please use `PUBLIC_ROLE_LIKE ` instead.")
       self.copy_role("Gamma", self.auth_role_public, merge=True)
   ```




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to