本文整理汇总了Python中Tree.url_access方法的典型用法代码示例。如果您正苦于以下问题:Python Tree.url_access方法的具体用法?Python Tree.url_access怎么用?Python Tree.url_access使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tree
的用法示例。
在下文中一共展示了Tree.url_access方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: check_perms
# 需要导入模块: import Tree [as 别名]
# 或者: from Tree import url_access [as 别名]
def check_perms(s, set, handles, **kwargs):
ask_flag = kwargs.get('Ask', True)
if not ask_flag:
if not MyUtil.get_yn('!!! Warning !!! ask = False: Will not ask to make changes, okay? Enter N to Exit, Y to Continue:'):
print('exiting...')
sys.exit(0)
for handle in handles:
if 'Document-' in handle:
fd = DCC.prop_get(s, handle, InfoSet = 'DocBasic')
elif 'Collection-' in handle:
fd = DCC.prop_get(s, handle, InfoSet = 'CollData')
else:
fd = DCC.prop_get(s, handle, InfoSet = 'Title')
fd['permissions'] = DCC.prop_get(s, handle, InfoSet = 'Perms')
# print(fd['handle'], ':', fd['title'])
print('\n>>>>>>>>>>>>>> DCC Information <<<<<<<<<<<<<<')
if 'Document-' in handle:
DCC.print_doc_basic(fd)
elif 'Collection-' in handle:
DCC.print_coll_data(fd)
else:
print('Not Document or Collection:', handle, ':', fd['title'])
print('\n\tDoc Properties URL: ',Tree.url_view(handle))
print('\tPermissions URL: ',Tree.url_perm(handle))
print('\tGet Document URL: ',Tree.url_access(handle))
print()
fix_objact(s, fd, handle, set, **kwargs)
fix_permact(s, fd, handle, set, **kwargs)