mirror of
git://git.yoctoproject.org/layerindex-web.git
synced 2025-07-19 20:59:01 +02:00
Ensure user_can_edit email address check ignores case and spaces
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
This commit is contained in:
parent
f7b2bd71b1
commit
665e40e2c5
|
@ -76,9 +76,10 @@ class LayerItem(models.Model):
|
||||||
return matches
|
return matches
|
||||||
|
|
||||||
def user_can_edit(self, user):
|
def user_can_edit(self, user):
|
||||||
|
user_email = user.email.strip().lower()
|
||||||
if user.is_authenticated():
|
if user.is_authenticated():
|
||||||
for maintainer in self.active_maintainers():
|
for maintainer in self.active_maintainers():
|
||||||
if maintainer.email == user.email:
|
if maintainer.email.strip().lower() == user_email:
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user