Forgot to run tests

This commit is contained in:
Christoph Haas 2021-02-28 22:07:33 +01:00
parent 7004e14a88
commit eee196507b
3 changed files with 13 additions and 15 deletions

View file

@ -1,6 +1,6 @@
class AdminController < ApplicationController class AdminController < ApplicationController
# before_action :authenticate_user! before_action :authenticate_user!
# before_action :admin_only before_action :admin_only
# def status # def status
# end # end
@ -28,11 +28,11 @@ class AdminController < ApplicationController
# private # private
# def admin_only def admin_only
# unless current_user.is_admin? unless current_user.admin_role?
# head :forbidden head :forbidden
# # redirect_to :back, :alert => "Access denied." # redirect_to :back, :alert => "Access denied."
# end end
# end end
end end

View file

@ -18,7 +18,7 @@
.cell.pkgcard data-equalizer-watch=true .cell.pkgcard data-equalizer-watch=true
a.black href=package_path(name: pkg.name) a.black href=package_path(name: pkg.name)
.image .image
= small_img(screenshots_visible_to_user(pkg, session).first, cls: '') = small_img(pkg.screenshots.accessible_by(current_ability, :view).first, cls: '')
.text.pkgname .text.pkgname
= pkg.name = pkg.name
.text .text
@ -29,7 +29,7 @@
.small-12.medium-4.cell.pkgcard .small-12.medium-4.cell.pkgcard
a.black href=package_path(name: pkg.name) a.black href=package_path(name: pkg.name)
.image .image
= small_img(screenshots_visible_to_user(pkg, session).first, cls: '') = small_img(pkg.screenshots.accessible_by(current_ability, :view).first, cls: '')
.small-12.medium-8.cell .small-12.medium-8.cell
h2 h2
a href=package_path(name: pkg.name) a href=package_path(name: pkg.name)

View file

@ -5,7 +5,7 @@ admin:
email: admin@debian.ork email: admin@debian.ork
sign_in_count: 5 sign_in_count: 5
provider: local provider: local
admin: 1 admin_role: true
encrypted_password: <%= Devise::Encryptor.digest(User, 'adminsecret') %> encrypted_password: <%= Devise::Encryptor.digest(User, 'adminsecret') %>
normal: normal:
@ -15,15 +15,13 @@ normal:
email: mortal@debian.ork email: mortal@debian.ork
sign_in_count: 3 sign_in_count: 3
provider: local provider: local
admin: 0
encrypted_password: <%= Devise::Encryptor.digest(User, 'normalsecret') %> encrypted_password: <%= Devise::Encryptor.digest(User, 'normalsecret') %>
debian: debian:
name: Detlef Debian name: Detlef Debian
created_at: 2018-01-01 created_at: 2018-01-01
updated_at: 2018-01-01 updated_at: 2018-01-01
email: detlef@debian.ork email: detlef@debian.org
sign_in_count: 0 sign_in_count: 0
provider: debian-sso provider: salsa
admin: 0
encrypted_password: nil encrypted_password: nil