passage en revue de FIXME et correction de certains
This commit is contained in:
parent
0284785672
commit
325b53cf65
|
@ -109,7 +109,7 @@ class GroupUnion(GroupMixin, commonGroups.GroupUnion):
|
|||
objects.register(GroupUnion)
|
||||
|
||||
|
||||
### FIXME: To remove later.
|
||||
# Compatibility with Glasnost < 0.7 (TODO: remove someday)
|
||||
Group = GroupUnion
|
||||
|
||||
|
||||
|
|
|
@ -54,8 +54,9 @@ class AdminProviders(objects.AdminCommon):
|
|||
_kindName = 'Id'
|
||||
label = N_('Remote Identity Provider')
|
||||
serverRoles = ['providers']
|
||||
|
||||
# FIXME: To do: Restrict to identity providers ids. Don't accept
|
||||
# service providers ids.
|
||||
# service providers ids. (add a getValues() method)
|
||||
|
||||
serverRole = 'providers'
|
||||
|
||||
|
|
|
@ -728,12 +728,6 @@ class ul(Tag):
|
|||
name = 'ul'
|
||||
|
||||
|
||||
class gridBagLayout(table):
|
||||
# FIXME: Perhaps modify this component, if we can do better html code
|
||||
# for this component feature.
|
||||
_class = 'gridBagLayout'
|
||||
|
||||
|
||||
def convertStringToXml(s):
|
||||
s = s.replace('&', '&')
|
||||
s = s.replace('<', '<')
|
||||
|
|
|
@ -98,26 +98,16 @@ def parseGlasnostLink(link):
|
|||
url = '[{glasnost:alias:%s:%s%s}]' % (dispatcherHost, localId, option)
|
||||
return title, url
|
||||
|
||||
serverRoles = { # FIXME: this won't work with cards
|
||||
serverRoles = { # backward compatibility
|
||||
'art': 'articles',
|
||||
'article': 'articles',
|
||||
'atom': 'atoms',
|
||||
'book': 'books',
|
||||
'card': 'cards',
|
||||
'election': 'elections',
|
||||
'file': 'uploadfiles',
|
||||
'grade': 'grades',
|
||||
'group': 'groups',
|
||||
'heading': 'rubrics',
|
||||
'img': 'uploadfiles',
|
||||
'image': 'uploadfiles',
|
||||
'person': 'people',
|
||||
'personne': 'people',
|
||||
'rubric': 'rubrics',
|
||||
'rubrique': 'rubrics',
|
||||
'short': 'breves',
|
||||
'system': 'systemfiles',
|
||||
'vote': 'votes',
|
||||
}
|
||||
if serverRoles.has_key(role):
|
||||
serverRole = serverRoles[role]
|
||||
|
|
|
@ -280,16 +280,6 @@ def getConfigNoCache(section, value, default = None, vars = None, raw = 0):
|
|||
return default
|
||||
|
||||
|
||||
### FIXME: To remove ASAP.
|
||||
|
||||
|
||||
def getSlotPath(slot):
|
||||
if slot is None:
|
||||
return 'self'
|
||||
else:
|
||||
return slot.getPath()
|
||||
|
||||
|
||||
def getThingClass(thingCategory, thingName):
|
||||
"""Return the class of a thing."""
|
||||
|
||||
|
|
|
@ -94,8 +94,7 @@ class IdMixin(KindMixin):
|
|||
|
||||
|
||||
class SequenceMixin(AbstractSequenceMixin):
|
||||
fieldsCountMin = 1 # FIXME: To rename?
|
||||
fieldsCountMin_kindName = 'Integer'
|
||||
pass
|
||||
|
||||
|
||||
class StringMixin(KindMixin):
|
||||
|
@ -281,8 +280,6 @@ register(Link)
|
|||
|
||||
|
||||
class Mapping(KindMixin, proxyKinds.Mapping):
|
||||
fieldsCountMin = 1 # FIXME: To rename?
|
||||
fieldsCountMin_kindName = 'Integer'
|
||||
|
||||
def isEmptyModelValue(self, slot, value):
|
||||
return not value
|
||||
|
|
|
@ -78,9 +78,6 @@ def getGtk(id):
|
|||
return getGtkForServerRole(commonTools.extractRole(id))
|
||||
|
||||
def getGtkForServerRole(serverRole):
|
||||
# FIXME: We should clear _cachedGtksByServerRole when userToken value
|
||||
# changes. Because different users can use the same process, or a user can
|
||||
# login or logout.
|
||||
serverRole = serverRole.replace('-', '')
|
||||
if not _cachedGtksByServerRole.has_key(serverRole):
|
||||
# Code inspired from the module knee.
|
||||
|
@ -106,7 +103,7 @@ def getGtkForServerRole(serverRole):
|
|||
gtk = module.__dict__[gtkName]()
|
||||
break
|
||||
else:
|
||||
#gtk = getProxyForServerRole(serverRole)
|
||||
# TODO: ncards support
|
||||
return None
|
||||
_cachedGtksByServerRole[serverRole] = gtk
|
||||
return _cachedGtksByServerRole[serverRole]
|
||||
|
|
|
@ -259,10 +259,6 @@ def getWeb(id):
|
|||
|
||||
|
||||
def getWebForServerRole(serverRole):
|
||||
# FIXME: We should clear _cachedWebsByServerRole when userToken value
|
||||
# changes. Because different users can use the same process, or a user can
|
||||
# login or logout.
|
||||
|
||||
if context.getVar('knownRoles') and \
|
||||
not serverRole in context.getVar('knownRoles'):
|
||||
return None
|
||||
|
@ -309,6 +305,7 @@ def getWebForServerRole(serverRole):
|
|||
except faults.MissingItem:
|
||||
return getProxyForServerRole(serverRole)
|
||||
import NCardsWeb
|
||||
# TODO: cache this?
|
||||
return NCardsWeb.getWebClass(ncard)()
|
||||
web = getProxyForServerRole(serverRole)
|
||||
_cachedWebsByServerRole[serverRoleWeb] = web
|
||||
|
@ -620,7 +617,6 @@ def getTemplateVars():
|
|||
|
||||
loginButton = X.buttonStandalone('login', loginUrl).getAsXml()
|
||||
|
||||
# FIXME: should take the favourite identities method
|
||||
newAccountUrl = X.roleUrl('identities', action = 'newAccount')
|
||||
newAccountButton = X.buttonStandalone(
|
||||
'new-account', newAccountUrl).getAsXml()
|
||||
|
|
Reference in New Issue