-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathcontroller.rb
89 lines (79 loc) · 2.1 KB
/
controller.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# frozen_string_literal: true
module Entitlements
class Backend
class Dummy
class Controller < Entitlements::Backend::BaseController
register
# :nocov:
include ::Contracts::Core
C = ::Contracts
# Pre-fetch the existing group membership in each OU.
#
# Takes no arguments.
#
# Returns nothing. (Populates cache.)
Contract C::None => C::Any
def prefetch
# This does nothing.
end
# Validation routines.
#
# Takes no arguments.
#
# Returns nothing. (Populates cache.)
Contract C::None => C::Any
def validate
# This does nothing.
end
# Get count of changes.
#
# Takes no arguments.
#
# Returns an Integer.
Contract C::None => Integer
def change_count
super
end
# Calculation routines.
#
# Takes no arguments.
#
# Returns nothing (populates @actions).
Contract C::None => C::Any
def calculate
# No point in calculating anything. Any references herein will be calculated automatically.
@actions = []
end
# Pre-apply routines.
#
# Takes no arguments.
#
# Returns nothing.
Contract C::None => C::Any
def preapply
# This does nothing.
end
# Apply changes.
#
# action - Action array.
#
# Returns nothing.
Contract Entitlements::Models::Action => C::Any
def apply(caction)
# This does nothing.
end
# Validate configuration options.
#
# key - String with the name of the group.
# data - Hash with the configuration data.
#
# Returns nothing.
Contract String, C::HashOf[String => C::Any] => nil
def validate_config!(key, data)
# Do nothing to validate. Pass whatever arguments you want, and this will just ignore them!
end
# :nocov:
end
end
end
end