I'm trying to create a hosted feature layer view via the feature layer collection manager in 10.6.1 with python API 1.5.2.
In the managers.py there is this
function, which has a block to get the username for the sharing API
if gis._url.lower().find("sharing/rest") < 0:
url = gis._url + "/sharing/rest"
url = gis._url
if 'id' in gis.properties.user:
me = gis.properties.user.id
me = gis.user.me.username
url = "%s/content/users/%s/createService" % (url, me)
I haven't got 'id' in the properties.user and there is no gis.user - and it's weird that this property isn't checked before attempting access - so the developer has assumed it will be present.
I'm using built in portal IDP. So looks like we have a missing test case?
I'm going to rewrite the code to fix this use case but interested to know why gis.user.me is missing from my GIS object.
EDIT: Assuming the line should be:
elif 'username' in gis.properties.user: