Skip to content
This repository was archived by the owner on Feb 25, 2021. It is now read-only.
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# Unreleased

## Added

* Added `api_key_enabled` attribute to role record.

# v3.0.3
* Allow annotations to be set on a policy resource.

Expand Down
6 changes: 6 additions & 0 deletions lib/conjur/policy/types/records.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ def immutable_attribute_names
end

module ActsAsRole
def self.included(base)
base.module_eval do
attribute :api_key_enabled, kind: :boolean, singular: true, dsl_accessor: true
end
end

def roleid default_account = nil
[ account || default_account, role_kind, id ].join(":")
end
Expand Down
1 change: 1 addition & 0 deletions spec/round-trip/yaml/all-types-all-fields.expected.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
- !role
id: team-1
kind: jenkins-folder
api_key_enabled: true
- !resource
id: my-secret
kind: variable
Expand Down
1 change: 1 addition & 0 deletions spec/round-trip/yaml/all-types-all-fields.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
- !role
kind: jenkins-folder
id: team-1
api_key_enabled: true

- !resource
kind: variable
Expand Down