@@ -159,40 +159,40 @@ protected function addFlash($type, $message)
159
159
}
160
160
161
161
/**
162
- * Checks if the attributes are granted against the current authentication token and optionally supplied object .
162
+ * Checks if the attributes are granted against the current authentication token and optionally supplied subject .
163
163
*
164
164
* @param mixed $attributes The attributes
165
- * @param mixed $object The object
165
+ * @param mixed $subject The subject
166
166
*
167
167
* @return bool
168
168
*
169
169
* @throws \LogicException
170
170
*/
171
- protected function isGranted ($ attributes , $ object = null )
171
+ protected function isGranted ($ attributes , $ subject = null )
172
172
{
173
173
if (!$ this ->container ->has ('security.authorization_checker ' )) {
174
174
throw new \LogicException ('The SecurityBundle is not registered in your application. ' );
175
175
}
176
176
177
- return $ this ->container ->get ('security.authorization_checker ' )->isGranted ($ attributes , $ object );
177
+ return $ this ->container ->get ('security.authorization_checker ' )->isGranted ($ attributes , $ subject );
178
178
}
179
179
180
180
/**
181
181
* Throws an exception unless the attributes are granted against the current authentication token and optionally
182
- * supplied object .
182
+ * supplied subject .
183
183
*
184
184
* @param mixed $attributes The attributes
185
- * @param mixed $object The object
185
+ * @param mixed $subject The subject
186
186
* @param string $message The message passed to the exception
187
187
*
188
188
* @throws AccessDeniedException
189
189
*/
190
- protected function denyAccessUnlessGranted ($ attributes , $ object = null , $ message = 'Access Denied. ' )
190
+ protected function denyAccessUnlessGranted ($ attributes , $ subject = null , $ message = 'Access Denied. ' )
191
191
{
192
- if (!$ this ->isGranted ($ attributes , $ object )) {
192
+ if (!$ this ->isGranted ($ attributes , $ subject )) {
193
193
$ exception = $ this ->createAccessDeniedException ($ message );
194
194
$ exception ->setAttributes ($ attributes );
195
- $ exception ->setSubject ($ object );
195
+ $ exception ->setSubject ($ subject );
196
196
197
197
throw $ exception ;
198
198
}
0 commit comments