Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

notebook -- allow admin user to view any worksheet #3743

Closed
TimothyClemans mannequin opened this issue Jul 29, 2008 · 6 comments
Closed

notebook -- allow admin user to view any worksheet #3743

TimothyClemans mannequin opened this issue Jul 29, 2008 · 6 comments

Comments

@TimothyClemans
Copy link
Mannequin

TimothyClemans mannequin commented Jul 29, 2008

User "admin" will be able to go to hostname/users and click on any listed user and have complete access to that user's worksheets.

Component: notebook

Issue created by migration from https://trac.sagemath.org/ticket/3743

@TimothyClemans
Copy link
Mannequin Author

TimothyClemans mannequin commented Jul 29, 2008

Attachment: sage-3743.patch.gz

@williamstein
Copy link
Contributor

comment:2

REFEREE REPORT:

You determine whether a user is an admin with

           if self.username == 'admin' 

It would be better to determine whether a user is an admin by using the account_type() method of users. This is because a user with a username other than 'admin' can still be an admin; with the code you've written you would introduce a bug since suddenly certain admin-like things wouldn't work for such a user, but they should.

@TimothyClemans
Copy link
Mannequin Author

TimothyClemans mannequin commented Jul 30, 2008

comment:3

I started out using user_type but for whatever reason for user admin it was returning 'user' so to get the functionality working at all I used the current work around.

@TimothyClemans
Copy link
Mannequin Author

TimothyClemans mannequin commented Jul 30, 2008

comment:4

Attachment: sage-3743_2.patch.gz

@williamstein
Copy link
Contributor

comment:5

Positive review

@sagetrac-mabshoff
Copy link
Mannequin

sagetrac-mabshoff mannequin commented Aug 6, 2008

comment:6

Merged both patches in Sage 3.1.alpha1

@sagetrac-mabshoff sagetrac-mabshoff mannequin closed this as completed Aug 6, 2008
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants