-
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #395 from sebadob/expand-scope-groups-roles-valida…
…tion Adjust validation for `roles`, `groups` and `scopes` names
- Loading branch information
Showing
8 changed files
with
122 additions
and
57 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,4 @@ | ||
-- remove the limit checks on id and name fields for roles, groups, scopes | ||
-- to allow longer scope names like i.e. 'urn:ietf:params:oauth:grant-type:device_code' | ||
|
||
-- noop on postgres -> has been done with past migrations already |
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,55 @@ | ||
-- remove the limit checks on id and name fields for roles, groups, scopes | ||
-- to allow longer scope names like i.e. 'urn:ietf:params:oauth:grant-type:device_code' | ||
|
||
create table scopes_dg_tmp | ||
( | ||
id varchar(36) not null | ||
constraint scopes_pk | ||
primary key, | ||
name varchar not null, | ||
attr_include_access varchar, | ||
attr_include_id varchar | ||
); | ||
|
||
insert into scopes_dg_tmp(id, name, attr_include_access, attr_include_id) | ||
select id, name, attr_include_access, attr_include_id | ||
from scopes; | ||
|
||
drop table scopes; | ||
|
||
alter table scopes_dg_tmp | ||
rename to scopes; | ||
|
||
create table groups_dg_tmp | ||
( | ||
id varchar not null | ||
constraint groups_pk | ||
primary key, | ||
name varchar not null | ||
); | ||
|
||
insert into groups_dg_tmp(id, name) | ||
select id, name | ||
from groups; | ||
|
||
drop table groups; | ||
|
||
alter table groups_dg_tmp | ||
rename to groups; | ||
|
||
create table roles_dg_tmp | ||
( | ||
id varchar not null | ||
constraint roles_pk | ||
primary key, | ||
name varchar not null | ||
); | ||
|
||
insert into roles_dg_tmp(id, name) | ||
select id, name | ||
from roles; | ||
|
||
drop table roles; | ||
|
||
alter table roles_dg_tmp | ||
rename to roles; |
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