Пример #1
0
def buttonItem(request, operation):  #根据一项操作产生操作菜单项!!!
    if hasPerm(request.user, request.model, operation):
        return u'<li><a href="%s/data/%s/">%s</a></li>' % (
            iclock_url_rel, model.__name__, model._meta.verbose_name)
    else:
        return u'<li>' + model._meta.verbose_name + '</li>'
Пример #2
0
def reqHasPerm(request, operation):  #判断一个当前请求的数据模型表是否有某个权限
    return hasPerm(request.user, request.model, operation)
Пример #3
0
def reqHasPerm(request, operation): #判断一个当前请求的数据模型表是否有某个权限
	return hasPerm(request.user, request.model, operation)
Пример #4
0
def buttonItem(request, operation): #根据一项操作产生操作菜单项!!!
	if hasPerm(request.user, request.model, operation):
		return u'<li><a href="%s/data/%s/">%s</a></li>'%(iclock_url_rel, model.__name__, model._meta.verbose_name)
	else:
		return u'<li>'+model._meta.verbose_name+'</li>'
Пример #5
0
def reqHasPerm(request, operation):
    return hasPerm(request.user, request.model, operation)