This now looks good. I have one advisory comment: only make this change if it makes sense.
isExpirable() uses the janitor to do a search because it doesn't have access to the user making the request. If you make that method take a user argument, you can have the web service fill in the current user automatically:
from lazr.restful.declarations import call_with, REQUEST_USER
@call_with(who=REQUEST_USER)
def isExpirable(who, days_old=None):
...
This now looks good. I have one advisory comment: only make this change if it makes sense.
isExpirable() uses the janitor to do a search because it doesn't have access to the user making the request. If you make that method take a user argument, you can have the web service fill in the current user automatically:
from lazr.restful. declarations import call_with, REQUEST_USER who=REQUEST_ USER)
@call_with(
def isExpirable(who, days_old=None):
...