Mercurial > kallithea
diff rhodecode/lib/__init__.py @ 1982:87f0800abc7b beta
#227 Initial version of repository groups permissions system
- implemented none/read/write/admin permissions for groups
- wrote more tests for permissions, and new permissions groups
- a lot of code garden, splitted logic into proper models
- permissions on groups doesn't propagate yet to repositories
- deprecated some methods on api for managing permissions on
repositories for users, and users groups
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Sat, 28 Jan 2012 01:06:29 +0200 |
parents | 89efedac4e6c |
children | 324ac367a4da |
line wrap: on
line diff
--- a/rhodecode/lib/__init__.py Sun Feb 05 21:45:15 2012 +0200 +++ b/rhodecode/lib/__init__.py Sat Jan 28 01:06:29 2012 +0200 @@ -25,6 +25,8 @@ import os import re +from vcs.utils.lazy import LazyProperty + def __get_lem(): from pygments import lexers @@ -213,6 +215,7 @@ except (ImportError, UnicodeDecodeError, Exception): return unicode(str_, from_encoding, 'replace') + def safe_str(unicode_, to_encoding='utf8'): """ safe str function. Does few trick to turn unicode_ into string @@ -250,7 +253,6 @@ return safe_str - def engine_from_config(configuration, prefix='sqlalchemy.', **kwargs): """ Custom engine_from_config functions that makes sure we use NullPool for @@ -393,6 +395,7 @@ return ''.join(uri) + def get_changeset_safe(repo, rev): """ Safe version of get_changeset if this changeset doesn't exists for a @@ -437,6 +440,7 @@ "was: %s" % err) return None + def extract_mentioned_users(s): """ Returns unique usernames from given string s that have @mention