eschutho commented on a change in pull request #14741:
URL: https://github.com/apache/superset/pull/14741#discussion_r644215515



##########
File path: superset-frontend/src/SqlLab/components/ResultSet.tsx
##########
@@ -526,34 +526,32 @@ export default class ResultSet extends 
React.PureComponent<
     const { results, rows, queryLimit, limitingFactor } = this.props.query;
     let limitMessage;
     const limitReached = results?.displayLimitReached;
-    const isAdmin = !!this.props.user?.roles.Admin;
     const limit = queryLimit || results.query.limit;
+    const isAdmin = !!this.props.user?.roles.Admin;

Review comment:
       That looks good. @suddjian did make a fix whereby localstorage was 
overwriting user roles, but I think this works as a guard against any other 
issues that may be creeping up. At some point maybe we can take another look 
into why or when a user wouldn't have any roles. 
   




-- 
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