-
Notifications
You must be signed in to change notification settings - Fork 189
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Authentication] enhances api tokens management
- Loading branch information
Showing
27 changed files
with
388 additions
and
277 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
|
||
namespace Claroline\AppBundle\Entity\Restriction; | ||
|
||
use Doctrine\ORM\Mapping as ORM; | ||
|
||
trait Locked | ||
{ | ||
/** | ||
* @ORM\Column(name="is_locked", type="boolean", options={"default" = 0}) | ||
* | ||
* @var bool | ||
*/ | ||
protected $locked = false; | ||
|
||
public function isLocked(): bool | ||
{ | ||
return $this->locked; | ||
} | ||
|
||
public function setLocked(bool $locked) | ||
{ | ||
$this->locked = $locked; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
src/main/authentication/Installation/Migrations/pdo_mysql/Version20210309080703.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php | ||
|
||
namespace Claroline\AuthenticationBundle\Installation\Migrations\pdo_mysql; | ||
|
||
use Doctrine\DBAL\Schema\Schema; | ||
use Doctrine\Migrations\AbstractMigration; | ||
|
||
/** | ||
* Auto-generated migration based on mapping information: modify it with caution. | ||
* | ||
* Generation date: 2021/03/09 08:07:05 | ||
*/ | ||
class Version20210309080703 extends AbstractMigration | ||
{ | ||
public function up(Schema $schema) | ||
{ | ||
$this->addSql(' | ||
ALTER TABLE claro_api_token | ||
ADD is_locked TINYINT(1) DEFAULT "0" NOT NULL | ||
'); | ||
$this->addSql(' | ||
ALTER TABLE claro_ip_user CHANGE is_locked is_locked TINYINT(1) DEFAULT "0" NOT NULL | ||
'); | ||
} | ||
|
||
public function down(Schema $schema) | ||
{ | ||
$this->addSql(' | ||
ALTER TABLE claro_api_token | ||
DROP is_locked | ||
'); | ||
$this->addSql(' | ||
ALTER TABLE claro_ip_user CHANGE is_locked is_locked TINYINT(1) NOT NULL | ||
'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 0 additions & 51 deletions
51
src/main/authentication/Resources/modules/integration/tokens/components/token.jsx
This file was deleted.
Oops, something went wrong.
43 changes: 0 additions & 43 deletions
43
src/main/authentication/Resources/modules/integration/tokens/components/tokens.jsx
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.