You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by je...@apache.org on 2015/10/21 13:33:36 UTC
allura git commit: Remove unused method that would be insecure if
used (no user_id check)
Repository: allura
Updated Branches:
refs/heads/master bae38ad96 -> f33baf423
Remove unused method that would be insecure if used (no user_id check)
Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/f33baf42
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/f33baf42
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/f33baf42
Branch: refs/heads/master
Commit: f33baf423d9c7a11d76d1e860eb720bc2d792379
Parents: bae38ad
Author: Dave Brondsema <da...@brondsema.net>
Authored: Mon Oct 19 18:53:51 2015 +0000
Committer: Dave Brondsema <da...@brondsema.net>
Committed: Mon Oct 19 18:53:51 2015 +0000
----------------------------------------------------------------------
Allura/allura/model/oauth.py | 15 ---------------
1 file changed, 15 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/allura/blob/f33baf42/Allura/allura/model/oauth.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/oauth.py b/Allura/allura/model/oauth.py
index fb395f5..6dc00e5 100644
--- a/Allura/allura/model/oauth.py
+++ b/Allura/allura/model/oauth.py
@@ -20,11 +20,9 @@ import logging
import oauth2 as oauth
from pylons import tmpl_context as c, app_globals as g
-import pymongo
from paste.deploy.converters import aslist
from tg import config
from ming import schema as S
-from ming.orm import session
from ming.orm import FieldProperty, RelationProperty, ForeignIdProperty
from ming.orm.declarative import MappedClass
@@ -72,19 +70,6 @@ class OAuthConsumerToken(OAuthToken):
user = RelationProperty('User')
- @classmethod
- def upsert(cls, name):
- t = cls.query.get(name=name)
- if t is not None:
- return t
- try:
- t = cls(name=name)
- session(t).flush(t)
- except pymongo.errors.DuplicateKeyError:
- session(t).expunge(t)
- t = cls.query.get(name=name)
- return t
-
@property
def description_html(self):
return g.markdown.cached_convert(self, 'description')