|
a/Allura/allura/controllers/project.py |
|
b/Allura/allura/controllers/project.py |
|
... |
|
... |
465 |
theme.color5 = color5
|
465 |
theme.color5 = color5
|
466 |
theme.color6 = color6
|
466 |
theme.color6 = color6
|
467 |
if icon is not None and icon != '':
|
467 |
if icon is not None and icon != '':
|
468 |
if self.neighborhood.icon:
|
468 |
if self.neighborhood.icon:
|
469 |
M.NeighborhoodFile.query.remove({'metadata.neighborhood_id':self.neighborhood._id})
|
469 |
M.NeighborhoodFile.query.remove({'metadata.neighborhood_id':self.neighborhood._id})
|
470 |
h.save_image(icon, M.NeighborhoodFile, square=True, thumbnail_size=(48, 48), meta=dict(neighborhood_id=self.neighborhood._id))
|
470 |
M.NeighborhoodFile.save_image(
|
|
|
471 |
icon.filename, icon.file, content_type=icon.type,
|
|
|
472 |
square=True, thumbnail_size=(48,48),
|
|
|
473 |
thumbnail_meta=dict(neighborhood_id=self.neighborhood._id))
|
471 |
redirect('overview')
|
474 |
redirect('overview')
|
472 |
|
475 |
|
473 |
@h.vardec
|
476 |
@h.vardec
|
474 |
@expose()
|
477 |
@expose()
|
475 |
def update_acl(self, permission=None, user=None, new=None, **kw):
|
478 |
def update_acl(self, permission=None, user=None, new=None, **kw):
|
|
... |
|
... |
584 |
if short is not None:
|
587 |
if short is not None:
|
585 |
award = M.Award(app_config_id=app_config_id, tool_version=tool_version)
|
588 |
award = M.Award(app_config_id=app_config_id, tool_version=tool_version)
|
586 |
award.short = short
|
589 |
award.short = short
|
587 |
award.full = full
|
590 |
award.full = full
|
588 |
award.created_by_neighborhood_id = self.neighborhood._id
|
591 |
award.created_by_neighborhood_id = self.neighborhood._id
|
589 |
h.save_image(icon, M.AwardFile, square=True, thumbnail_size=(48, 48), meta=dict(award_id=award._id))
|
592 |
M.AwardFile.save_image(
|
|
|
593 |
icon.filename, icon.file, content_type=icon.type,
|
|
|
594 |
square=True, thumbnail_size=(48,48),
|
|
|
595 |
thumbnail_meta=dict(award_id=award._id))
|
590 |
redirect(request.referer)
|
596 |
redirect(request.referer)
|
591 |
|
597 |
|
592 |
@expose()
|
598 |
@expose()
|
593 |
def grant(self, grant=None, recipient=None):
|
599 |
def grant(self, grant=None, recipient=None):
|
594 |
if request.method != 'POST':
|
600 |
if request.method != 'POST':
|