-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixes #5235: filter sensitive attributes from ui and exports
- adds a config filter_attributes that will remove definied attributes from a resource's default_attributes - by default those attributes include encrypted_password (devise!) as well as password and password_confirmation as a good guess - removes filtered attributes from default forms - adds feature specs for filtered attributes except JSON export - uses except option over Formtastics buggy skipped_columns config
- Loading branch information
Showing
11 changed files
with
92 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
Feature: Filter Attributes | ||
|
||
Filtering sensitive attributes | ||
|
||
Background: | ||
Given a configuration of: | ||
""" | ||
ActiveAdmin.register User | ||
""" | ||
Given I am logged in | ||
And a user named "John Doe" exists | ||
And I am on the index page for users | ||
|
||
Scenario: Default index page | ||
Then I should not see "Encrypted" | ||
But I should see "Age" | ||
|
||
Scenario: Default new form | ||
Given I follow "New User" | ||
Then I should not see "Encrypted" | ||
But I should see "Age" | ||
|
||
Scenario: Default edit form | ||
Given I follow "Edit" | ||
Then I should not see "Encrypted" | ||
But I should see "Age" | ||
|
||
Scenario: Default show page | ||
Given I follow "View" | ||
Then I should not see "Encrypted" | ||
But I should see "Age" | ||
|
||
Scenario: Default CSV export | ||
Given I follow "CSV" | ||
Then I should not see "Encrypted" | ||
But I should see "Age" | ||
|
||
# TODO: JSON | ||
# Scenario: Default JSON | ||
# Given I follow "JSON" | ||
# Then I should not see "encrypted" | ||
# But I should see "age" | ||
|
||
Scenario: Default XML | ||
Given I follow "XML" | ||
Then I should not see "encrypted" |
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
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