Skip to content

Commit

Permalink
Change roles slightly, remove demo shit ffrom security config
Browse files Browse the repository at this point in the history
  • Loading branch information
Constantine authored and Constantine committed Mar 20, 2012
1 parent 0539dd3 commit 21db52a
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 24 deletions.
23 changes: 1 addition & 22 deletions app/config/security.yml
Expand Up @@ -7,8 +7,7 @@ security:
ROLE_SUPERUSER: ROLE_USER
ROLE_UPLOADER: ROLE_USER
ROLE_SUPERUPLOADER: ROLE_UPLOADER
ROLE_GOLD: ROLE_SUPERUPLOADER
ROLE_MODERATOR: ROLE_UPLOADER
ROLE_MODERATOR: ROLE_SUPERUPLOADER
ROLE_MODERATOR_GAMES: ROLE_MODERATOR
ROLE_MODERATOR_MOVIES: ROLE_MODERATOR
ROLE_SUPERMODERATOR: [ROLE_MODERATOR_GAMES, ROLE_MODERATOR_MOVIES]
Expand All @@ -34,26 +33,6 @@ security:
logout: true
anonymous: true

dev:
pattern: ^/(_(profiler|wdt)|css|images|js)/
security: false

login:
pattern: ^/demo/secured/login$
security: false

secured_area:
pattern: ^/demo/secured/
form_login:
check_path: /demo/secured/login_check
login_path: /demo/secured/login
logout:
path: /demo/secured/logout
target: /demo/
#anonymous: ~
#http_basic:
# realm: "Secured Demo Area"

access_control:
#- { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY, requires_channel: https }
#- { path: ^/_internal, roles: IS_AUTHENTICATED_ANONYMOUSLY, ip: 127.0.0.1 }
Expand Down
27 changes: 26 additions & 1 deletion src/Rooty/UserBundle/Entity/User.php
Expand Up @@ -37,7 +37,7 @@ class User extends BaseUser
* @ORM\Column(type="date", nullable="true")
*/
protected $birthday;

/**
* @ORM\Column(type="string", length="32")
*/
Expand Down Expand Up @@ -87,6 +87,11 @@ class User extends BaseUser
*/
protected $last_activity;

/**
* @ORM\Column(type="boolean")
*/
protected $is_gold;

public function __construct()
{
parent::__construct();
Expand Down Expand Up @@ -461,4 +466,24 @@ public function getDownloaded()
{
return $this->downloaded;
}

/**
* Set is_gold
*
* @param boolean $isGold
*/
public function setIsGold($isGold)
{
$this->is_gold = $isGold;
}

/**
* Get is_gold
*
* @return boolean
*/
public function getIsGold()
{
return $this->is_gold;
}
}
47 changes: 46 additions & 1 deletion src/Rooty/UserBundle/Entity/User.php~
Expand Up @@ -37,7 +37,7 @@ class User extends BaseUser
* @ORM\Column(type="date", nullable="true")
*/
protected $birthday;

/**
* @ORM\Column(type="string", length="32")
*/
Expand Down Expand Up @@ -87,6 +87,11 @@ class User extends BaseUser
*/
protected $last_activity;

/**
* @ORM\Column(type="boolean")
*/
protected $is_gold;

public function __construct()
{
parent::__construct();
Expand Down Expand Up @@ -421,4 +426,44 @@ class User extends BaseUser
{
return $this->avatar_file;
}

/**
* Set uploaded
*
* @param integer $uploaded
*/
public function setUploaded($uploaded)
{
$this->uploaded = $uploaded;
}

/**
* Get uploaded
*
* @return integer
*/
public function getUploaded()
{
return $this->uploaded;
}

/**
* Set downloaded
*
* @param integer $downloaded
*/
public function setDownloaded($downloaded)
{
$this->downloaded = $downloaded;
}

/**
* Get downloaded
*
* @return integer
*/
public function getDownloaded()
{
return $this->downloaded;
}
}

0 comments on commit 21db52a

Please sign in to comment.