Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
A token has two new states: revoked and locked. If a token gets revoked it is revoked and locked. A locked token can not be modified anymore. We still need to disable some edit buttons in the webui. Working on #135
- Loading branch information
1 parent
a25010d
commit 887736a
Showing
21 changed files
with
467 additions
and
145 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
"""Add column revoked to Token table | ||
Revision ID: 20969b4cbf06 | ||
Revises: 4d9178fa8336 | ||
Create Date: 2015-08-27 12:19:57.272525 | ||
""" | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = '20969b4cbf06' | ||
down_revision = '4d9178fa8336' | ||
|
||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
def upgrade(): | ||
try: | ||
op.add_column('token', sa.Column('revoked', sa.Boolean(), | ||
nullable=False, | ||
default=False)) | ||
except Exception as exx: | ||
print "Could not add column 'revoked' to table 'token'" | ||
print (exx) | ||
|
||
try: | ||
op.add_column('token', sa.Column('locked', sa.Boolean(), | ||
nullable=False, | ||
default=False)) | ||
except Exception as exx: | ||
print "Could not add column 'locked' to table 'token'" | ||
print (exx) | ||
|
||
|
||
def downgrade(): | ||
op.drop_column('token', 'revoked') | ||
op.drop_column('token', 'locked') |
Oops, something went wrong.