-
Notifications
You must be signed in to change notification settings - Fork 34
Add papertrail gem #587
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Drinion
wants to merge
94
commits into
master
Choose a base branch
from
564-LOG_encryptable_read_access
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add papertrail gem #587
Changes from 1 commit
Commits
Show all changes
94 commits
Select commit
Hold shift + click to select a range
e98d484
Add papertrail gem
8db48ad
Replaced papertrail with paper_trail gem
9317dcd
Sort gems alphabetically
5cd488a
Add papertrail to model and migration
e9d37a3
Add ignore to papertrail
045b832
Fixed rubocop error
7983e14
Changed show function to touch
e20bd83
Add spec for touch
7f50548
Add specs for papertrail
8775a62
Change rubocop rule to allow touch method
5c9f03a
add route to logs and first draft of logs_controller
RamonaChristen 96a63c0
Fix rubocop and spec
610a59b
Add log policy
f33f40f
Change show to index
2473cb2
Refactor index? method
acfc099
Re-add show restriction
d73cae2
add controller spec
RamonaChristen 3744505
Fixed encryptable controller spec
c135350
extend controller spec, specs fail because controller doesn't work as…
RamonaChristen f9efbb4
add logs serializer and fix controller
RamonaChristen f265b72
fix rubocop error
RamonaChristen ad72818
Add logs component
590be35
Merge branch '564-LOG_encryptable_read_access' of https://github.com/…
cf7c8b7
restrict access for api users, add specs
RamonaChristen d2a96b3
Change policy to check for team membership
d744841
Add tabs for logs
9ae217a
Removed tautologous expectation+
6be41fe
Remove pry
739a20f
Add stub components for table and table row
5a064b1
add logs model to frontend
RamonaChristen fbe53cf
Merge remote-tracking branch 'origin/564-LOG_encryptable_read_access'…
RamonaChristen ab7e6cb
Fix log model not found error
00dd3e1
implement table-row.hbs, work on getting logs to frontend
RamonaChristen 477125a
Add adapter and fix component
5b61e29
Change log adapter name
8508e8a
Fix backend to frontend serialization
Robin481 1b63d3a
Fix table and add update to papertrail
04d1424
fix logs table, make prettier
RamonaChristen cc89947
log username instead of userid
RamonaChristen 1017f8c
Merge branch 'master' of https://github.com/puzzle/cryptopus into 564…
133b5a5
log view access
RamonaChristen cb57571
add translations for log entry event
RamonaChristen 6ac6a91
Merge branch '564-LOG_encryptable_read_access' of https://github.com/…
d537036
reload logs when switching tabs, fix linting errors
RamonaChristen b88a00e
fix rubocop errors
RamonaChristen e98beef
Merge branch 'master' of https://github.com/puzzle/cryptopus into 564…
1417b36
Rebase with master
5c1ac4b
Add encryptable specs
df3a9c9
add username and userid to log
RamonaChristen 5aec2e0
Merge remote-tracking branch 'origin/564-LOG_encryptable_read_access'…
RamonaChristen b991304
correct spelling of model attribute
RamonaChristen 0de70d1
add more frontend tests
RamonaChristen a1aabdd
improve frontend tests and add id to tabs
RamonaChristen 51c8933
fix serializer and backend specs
RamonaChristen 23fd312
use correct date format in paper_trail table
RamonaChristen f79ad57
user save_with_version on encryptable show
RamonaChristen c06353f
fix mistake
RamonaChristen 6d84e7f
Add destroy on delete to encryptable
b355ea1
merge master
RamonaChristen e055936
log all update actions, fix problem with sorting logs on update
RamonaChristen 5b352a9
limit query to only get 20 logs
RamonaChristen 37a0ba0
add load more button to always load 10 logs at a time
RamonaChristen 3286250
Change find_by to find
143eb24
Format code
791a15e
Fix rubocop issue
25937f6
Merge branch 'master' of https://github.com/puzzle/cryptopus into 564…
93aebfb
Adjust to PR review
30b9714
add system spec for view log
RamonaChristen 77d08a7
add test for edit log (doesnt pass yet)
RamonaChristen d478e36
fix bug where view access is logged as update
RamonaChristen c56df1a
Replace alice with bob to fix spec
679ea3f
Restructure specs
17bb5d9
adjust frontend log model to backend model
RamonaChristen f439030
load logs directly from Versions table, optimize viewed access log
RamonaChristen b737cbc
Change parent class of log policy
58f413c
Merge branch '564-LOG_encryptable_read_access' of https://github.com/…
f19dc36
Move papertrail spec to encryptable controller spec
8402150
change header names in logs table, add space between tabs and log table
RamonaChristen c2096e0
Add encryptables controller show test
f21bbbf
Merge branch '564-LOG_encryptable_read_access' of https://github.com/…
94f42b4
Remove trailing whitespaces
b4a0fa5
query for username in log query to aviod n+1
RamonaChristen 8aa4ddc
add version model
RamonaChristen 93dc302
use includes to get username to logs, refactor from paper-trail-versi…
RamonaChristen 41e728c
Merge branch 'master' into 564-LOG_encryptable_read_access
RamonaChristen 67661b0
Fix frontend test after merge conflict
RamonaChristen 1217ef4
improve load more function
RamonaChristen ee2bc92
extend versions destroy spec
RamonaChristen 8c7782a
572 log recent credentials on dashboard (#608)
renato-oester 65b5d3d
Merge remote-tracking branch 'origin/master' into 564-LOG_encryptable…
RamonaChristen 7923d78
Merge branch 'master' into 564-LOG_encryptable_read_access
RamonaChristen 0b45274
change translations in line with changes on main
RamonaChristen f3a4e62
Merge branch 'master' into 564-LOG_encryptable_read_access
RamonaChristen 1ad9130
Merge branch 'master' into 564-LOG_encryptable_read_access
RamonaChristen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is that necessary? (not necessarily criticizing just trying to understand)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @Robin481 The papertrail versions are not deleted from the db by default, if the encryptable they correspond to is deleted. We discussed if it would make sense to keep the old versions because the api user may still want to know what happened to an encryptable that doesn't exist anymore. However, keeping the old encryptables may pollute the db quite heavily. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes deleting them makes sense.
However,
dependent: :destroy
should already do that, that is why I am asking. 😁(there was more text here that I deleted because I got confused by which branch i was on 😂 )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Robin481 Yes,
dependent: :destroy
should do that but it doesn't. There might be something wrong with the way we used active record with regards topaper_trail
. I look into it.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update on this front?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this seems to be a bug within the papertrail gem,
dependent: :destroy
does not work here but I extended the encryptable_spec to make sure that our:destroy versions
method deletes everything it need to and nothing more so I think we should leave it like this