Skip to content

Commit

Permalink
Delete access control code
Browse files Browse the repository at this point in the history
  • Loading branch information
user890104 committed Oct 22, 2023
1 parent 85518d1 commit 0a56477
Show file tree
Hide file tree
Showing 19 changed files with 2 additions and 324 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/rspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ jobs:
# yarn install
# yarn build
# yarn build:css
- name: Configure Doors
run: cp config/doors.yml.example config/doors.yml
- name: Configure Database
run: cp config/database.yml.ci config/database.yml
- name: Setup Database
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
# Ignore sensitive information
/config/database.yml
/config/secrets.yml
/config/doors.yml

# Ignore simplecov's output
/coverage
Expand Down
24 changes: 0 additions & 24 deletions app/assets/stylesheets/components/_large_buttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,27 +33,3 @@
form { display: inline-block; }
}
}

.door_button {
@extend .btn;
@extend .btn-primary;
@extend .btn-lg;

@media (max-width: $screen-sm-min) {
width: 250px;
margin-top: 20px;
}

@media (min-width: $screen-sm-min) and (max-width: $screen-md-max) {
width: 350px;
i.fa { font-size: 36pt; }
margin-top: 30px;
}

@media (min-width: $screen-lg-min) {
width: 200px;
height: 200px;
i.fa { font-size: 72pt; }
margin: 10px;
}
}
44 changes: 0 additions & 44 deletions app/controllers/api/doors_controller.rb

This file was deleted.

58 changes: 0 additions & 58 deletions app/models/access_control/door.rb

This file was deleted.

1 change: 0 additions & 1 deletion app/models/access_control/door_controllers.rb

This file was deleted.

5 changes: 0 additions & 5 deletions app/models/access_control/door_controllers/dummy.rb

This file was deleted.

33 changes: 0 additions & 33 deletions app/models/access_control/door_controllers/netcontrol.rb

This file was deleted.

11 changes: 0 additions & 11 deletions app/models/access_control/door_controllers/shell_script.rb

This file was deleted.

13 changes: 0 additions & 13 deletions app/policies/access_control/door_policy.rb

This file was deleted.

5 changes: 0 additions & 5 deletions app/views/api/doors/index.json.jbuilder

This file was deleted.

1 change: 0 additions & 1 deletion app/views/api/lights/statuses/show.json.jbuilder

This file was deleted.

5 changes: 0 additions & 5 deletions bin/setup
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,6 @@ Dir.chdir APP_ROOT do
system 'cp config/database.yml.example config/database.yml'
end

puts "\n== Setting up the door configuration =="
unless File.exist?('config/doors.yml')
system 'cp config/doors.yml.example config/doors.yml'
end

puts "\n== Preparing database =="
system 'bundle exec rake db:create db:migrate db:test:prepare'

Expand Down
2 changes: 0 additions & 2 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,5 @@ class Application < Rails::Application
end

config.action_dispatch.rescue_responses["Pundit::NotAuthorizedError"] = :forbidden

config.x.doors = config_for(:doors)
end
end
2 changes: 1 addition & 1 deletion config/deploy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
# set :pty, true

# Default value for :linked_files is []
set :linked_files, fetch(:linked_files, []).push("config/doors.yml", "config/database.yml", "config/secrets.yml")
set :linked_files, fetch(:linked_files, []).push("config/database.yml", "config/secrets.yml")

# Default value for linked_dirs is []
set :linked_dirs, fetch(:linked_dirs, []).push("log", "tmp/pids", "tmp/cache", "tmp/sockets", "vendor/bundle", "public/system")
Expand Down
71 changes: 0 additions & 71 deletions config/doors.yml.example

This file was deleted.

18 changes: 0 additions & 18 deletions config/locales/bg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,24 +29,6 @@ bg:
few: OAuth приложения
many: OAuth приложения
other: OAuth приложения
door/actions/unlock:
zero: отключвания
one: отключване
few: отключвания
many: отключвания
other: отключвания
door/actions/open:
zero: отваряния
one: отваряне
few: отваряния
many: отваряния
other: отваряния
door/actions/lock:
zero: заключвания
one: заключване
few: заключвания
many: заключвания
other: заключвания
user:
zero: Лабъри
one: Лабър
Expand Down
18 changes: 0 additions & 18 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,6 @@ en:
phone_number:
improbable_phone: must be a valid phone number
models:
door/actions/unlock:
zero: unlocks
one: unlock
few: unlocks
many: unlocks
other: unlocks
door/actions/open:
zero: opens
one: open
few: opens
many: opens
other: opens
door/actions/lock:
zero: locks
one: lock
few: locks
many: locks
other: locks
user:
zero: Lab members
one: Lab member
Expand Down
Loading

0 comments on commit 0a56477

Please sign in to comment.