Skip to content

Commit

Permalink
Remove encryption algorithm and bitsize from serializer
Browse files Browse the repository at this point in the history
  • Loading branch information
lkleisa committed Jul 12, 2023
1 parent 46c76f7 commit 87ef27b
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 13 deletions.
10 changes: 1 addition & 9 deletions app/serializers/encryptable_serializer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,11 @@
# https://github.com/puzzle/cryptopus.

class EncryptableSerializer < ApplicationSerializer
attributes :id, :name, :description, :sender_name, :encryption_algorithm, :team_password_bitsize
attributes :id, :name, :description, :sender_name

belongs_to :folder

def sender_name
object.sender&.label
end

def encryption_algorithm
object.folder.team.encryption_algorithm
end

def team_password_bitsize
object.folder.team.password_bitsize
end
end
2 changes: 0 additions & 2 deletions frontend/app/models/encryptable.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import { isPresent } from "@ember/utils";
export default class Encryptable extends Model {
@attr("string") name;
@attr("string") description;
@attr("string") encryptionAlgorithm;
@attr("number") teamPasswordBitsize;
@attr("string") createdAt;
@attr("string") updatedAt;
@attr("string") sender_name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
{{#unless this.args.row}}
<span class="encryptable-lock-icon">
<img class="encrypted-icon d-inline-block" src="/assets/images/encrypted_small.svg" alt="encrypted value">
<BsTooltip @title="{{t "tooltips.encryption_algorithm"}} AES256iv/256 bits" @delayShow="300" />
<BsTooltip @title="{{t "tooltips.encryption_algorithm"}} AES256iv" @delayShow="300" />
</span>
{{/unless}}
</div>
2 changes: 1 addition & 1 deletion frontend/app/templates/components/encryptable/form.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
<el.control autocomplete="off" @name="cleartext{{capitalize attribute}}"></el.control>
<span class="encrypted-icon-span">
{{!-- Bind Popper to modal with viewportSelector, more information: https://www.ember-bootstrap.com/api/classes/Components.Tooltip.html#property_viewportPadding--}}
<BsTooltip @title="{{t "tooltips.encryption_algorithm"}} AES256iv/256 bits" @delayShow="300" />
<BsTooltip @title="{{t "tooltips.encryption_algorithm"}} AES256iv" @delayShow="300" />
<img class="encrypted-icon d-inline-block"
src="/assets/images/encrypted_small.svg" alt="encrypted value">
</span>
Expand Down

0 comments on commit 87ef27b

Please sign in to comment.