api: remove deprecated grant_scope_id field (#4886)

* api: remove deprecated grant_scope_id field

The grant_scope_id field was deprecated in 0.15.0, so we can remove
it for 0.17.0.

* Fix tests

* Fix more tests

* Remove an option and some related code that stuck around

* Fix bats tests

---------

Co-authored-by: Jeff Mitchell <jeffrey.mitchell@gmail.com>
This commit is contained in:
Johan Brandhorst-SatzkornandJeff Mitchell authored and GitHub committed 2024-06-17 12:09:33 -07:00
1 parent d547e0d459
commit c6f3c375f3
21 files changed
+107 -297

No files matched your search

+10 -2
View File
@@ -6,12 +6,20 @@ load _authorized_actions
function create_role() {
local sid=$1
local name=$2
local gsid=$3
boundary roles create \
-scope-id $sid \
-name $name \
-description 'test role' \
-description 'test role'
}
function set_grant_scopes() {
local sid=$1
local name=$2
local gsid=$3
boundary roles set-grant-scopes \
-id $(role_id $name $sid) \
-grant-scope-id $gsid
}
+6 -2
View File
@@ -15,13 +15,17 @@ export NEW_GRANT='ids=*;type=*;actions=create,read,update,delete,list'
}
@test "boundary/roles: can add $NEW_ROLE role to global scope granting rights in default org scope" {
run create_role $DEFAULT_GLOBAL $NEW_ROLE $DEFAULT_O_ID
run create_role $DEFAULT_GLOBAL $NEW_ROLE
echo "$output"
[ "$status" -eq 0 ]
run set_grant_scopes $DEFAULT_GLOBAL $NEW_ROLE $DEFAULT_O_ID
echo "$output"
[ "$status" -eq 0 ]
}
@test "boundary/roles: can not add already created $NEW_ROLE role" {
run create_role $DEFAULT_GLOBAL $NEW_ROLE $DEFAULT_O_ID
run create_role $DEFAULT_GLOBAL $NEW_ROLE
echo "$output"
[ "$status" -eq 1 ]
}