2013-03-26 12:11:38 -04:00
|
|
|
class KeyObserver < BaseObserver
|
2013-06-25 05:02:10 -04:00
|
|
|
def after_create(key)
|
2013-02-11 12:27:26 -05:00
|
|
|
GitlabShellWorker.perform_async(
|
2013-02-04 08:07:56 -05:00
|
|
|
:add_key,
|
2013-02-05 04:12:15 -05:00
|
|
|
key.shell_id,
|
2013-02-04 08:07:56 -05:00
|
|
|
key.key
|
2013-01-28 14:02:10 -05:00
|
|
|
)
|
2013-03-19 14:00:41 -04:00
|
|
|
|
2013-03-26 12:11:38 -04:00
|
|
|
notification.new_key(key)
|
2012-03-04 08:35:15 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
def after_destroy(key)
|
2013-02-11 12:27:26 -05:00
|
|
|
GitlabShellWorker.perform_async(
|
2013-01-28 14:02:10 -05:00
|
|
|
:remove_key,
|
2013-02-05 04:12:15 -05:00
|
|
|
key.shell_id,
|
2013-02-04 08:07:56 -05:00
|
|
|
key.key,
|
2013-01-28 14:02:10 -05:00
|
|
|
)
|
2012-03-04 08:35:15 -05:00
|
|
|
end
|
|
|
|
end
|