Package coprs :: Module models :: Class User
[hide private]
[frames] | no frames]

_BoundDeclarativeMeta User

source code


Represents user of the copr frontend

Nested Classes [hide private]

Inherited from flask_sqlalchemy.Model: query_class

Instance Methods [hide private]
 
permissions_for_copr(self, copr)
Get permissions of this user for the given copr.
source code
 
can_build_in(self, copr)
Determine if this user can build in the given copr.
source code
 
can_build_in_group(self, group)
:type group: Group
source code
 
can_edit(self, copr)
Determine if this user can edit the given copr.
source code
 
__init__(self, **kwargs)
A simple constructor that allows initialization from kwargs.
source code

Inherited from unreachable.Model: query

Inherited from helpers.Serializer: to_dict

Class Variables [hide private]
  id = db.Column(db.Integer, primary_key= True)
  username = db.Column(db.String(100), nullable= False, unique= ...
  mail = db.Column(db.String(150), nullable= False)
  timezone = db.Column(db.String(50), nullable= True)
  proven = db.Column(db.Boolean, default= False)
  admin = db.Column(db.Boolean, default= False)
  proxy = db.Column(db.Boolean, default= False)
  api_login = db.Column(db.String(40), nullable= False, default=...
  api_token = db.Column(db.String(40), nullable= False, default=...
  api_token_expiration = db.Column(db.Date, nullable= False, def...
  openid_groups = db.Column(JSONEncodedDict)
  __mapper__ = <Mapper at 0xb46fd550; User>
  __table__ = Table('user', MetaData(bind=None), Column('id', In...
  __tablename__ = 'user'
  _sa_class_manager = <ClassManager of <class 'coprs.models.User...

Inherited from unreachable.Model: metadata

Inherited from unreachable.Model (private): _decl_class_registry

Properties [hide private]
  name
Return the short username of the user, e.g.
  user_teams
  user_groups
  serializable_attributes
  coprs_count
Get number of coprs for this user.
  gravatar_url
Return url to libravatar image.
Method Details [hide private]

permissions_for_copr(self, copr)

source code 

Get permissions of this user for the given copr. Caches the permission during one request, so use this if you access them multiple times

__init__(self, **kwargs)
(Constructor)

source code 

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in ``kwargs``.

Only keys that are present as attributes of the instance's class are allowed. These could be, for example, any mapped columns or relationships.

Overrides: unreachable.Model.__init__

Class Variable Details [hide private]

username

Value:
db.Column(db.String(100), nullable= False, unique= True)

api_login

Value:
db.Column(db.String(40), nullable= False, default= "abc")

api_token

Value:
db.Column(db.String(40), nullable= False, default= "abc")

api_token_expiration

Value:
db.Column(db.Date, nullable= False, default= datetime.date(2000, 1, 1)\
)

__table__

Value:
Table('user', MetaData(bind=None), Column('id', Integer(), table=<user\
>, primary_key=True, nullable=False), Column('username', String(length\
=100), table=<user>, nullable=False), Column('mail', String(length=150\
), table=<user>, nullable=False), Column('timezone', String(length=50)\
, table=<user>), Column('proven', Boolean(), table=<user>, default=Col\
umnDefault(False)), Column('admin', Boolean(), table=<user>, default=C\
olumnDefault(False)), Column('proxy', Boolean(), table=<user>, default\
=ColumnDefault(False)), Column('api_login', String(length=40), table=<\
...

_sa_class_manager

Value:
<ClassManager of <class 'coprs.models.User'> at b4712030>

Property Details [hide private]

name

Return the short username of the user, e.g. bkabrda

user_teams

user_groups

serializable_attributes

coprs_count

Get number of coprs for this user.

gravatar_url

Return url to libravatar image.