Skip to content

Commit

Permalink
Merge pull request #1302 from bjoernricks/write-permission-fix
Browse files Browse the repository at this point in the history
Permission fixes
swaterkamp authored Apr 24, 2019

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
2 parents 9115c2d + 6c80ed1 commit 1125329
Showing 5 changed files with 90 additions and 320 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -20,6 +20,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Cleanup get_report function in gsad [#1263](https://github.com/greenbone/gsa/pull/1263)

### Fixed
- Fix creating permissions via the create multiple permissions dialog [#1302](https://github.com/greenbone/gsa/pull/1302)
- Fix showing host in Scanner dialog [#1301](https://github.com/greenbone/gsa/pull/1301)
- Fix detailslinks in AllSecInfo [#1299](https://github.com/greenbone/gsa/pull/1299)
- Only run libmicrohttp in debug mode if gsad build type is debug [#1295](https://github.com/greenbone/gsa/pull/1295)
4 changes: 2 additions & 2 deletions gsa/src/gmp/commands/permissions.js
Original file line number Diff line number Diff line change
@@ -99,7 +99,7 @@ class PermissionsCommand extends EntitiesCommand {

create({
id,
permission,
permission, // permission is read or write here
entityType,
comment = '',
groupId,
@@ -112,7 +112,7 @@ class PermissionsCommand extends EntitiesCommand {
const data = {
cmd: 'create_permissions',
comment,
permission,
permission_type: permission,
permission_group_id: groupId,
permission_role_id: roleId,
permission_user_id: userId,
2 changes: 1 addition & 1 deletion gsa/src/web/pages/permissions/multipledialog.js
Original file line number Diff line number Diff line change
@@ -228,7 +228,7 @@ MultiplePermissionDialog.propTypes = {
INCLUDE_RELATED_RESOURCES,
RELATED_RESOURCES_ONLY,
]),
permission: PropTypes.oneOf(['read', 'proxy']),
permission: PropTypes.oneOf(['read', 'write']),
related: PropTypes.array, // array of models
roleId: PropTypes.id,
roles: PropTypes.array,
2 changes: 1 addition & 1 deletion gsad/src/gsad.c
Original file line number Diff line number Diff line change
@@ -659,6 +659,7 @@ init_validator ()
gvm_validator_add (validator, "result_id", "^[a-z0-9\\-]+$");
gvm_validator_add (validator, "role", "^[[:alnum:] ]+$");
gvm_validator_add (validator, "permission", "^([_a-z]+|Super)$");
gvm_validator_add (validator, "permission_type", "^(read|write)$");
gvm_validator_add (validator, "port_list_id", "^[a-z0-9\\-]+$");
gvm_validator_add (validator, "port_range_id", "^[a-z0-9\\-]+$");
gvm_validator_add (
@@ -916,7 +917,6 @@ init_validator ()
gvm_validator_alias (validator, "subgroup_column", "group_column");
gvm_validator_alias (validator, "subject_id", "id");
gvm_validator_alias (validator, "subject_id_optional", "id_optional");
gvm_validator_alias (validator, "subject_name", "name");
gvm_validator_alias (validator, "subtype", "asset_type");
gvm_validator_alias (validator, "task_filter", "filter");
gvm_validator_alias (validator, "task_filt_id", "filt_id");
401 changes: 85 additions & 316 deletions gsad/src/gsad_gmp.c

Large diffs are not rendered by default.

0 comments on commit 1125329

Please sign in to comment.