@@ -19,13 +19,13 @@ import (
19
19
"k8s.io/apiserver/pkg/authentication/user"
20
20
"k8s.io/client-go/util/jsonpath"
21
21
kapi "k8s.io/kubernetes/pkg/api"
22
- "k8s.io/kubernetes/pkg/apis/authorization"
22
+ authorizationv1 "k8s.io/kubernetes/pkg/apis/authorization/v1 "
23
23
24
- "github.com/openshift/origin/pkg/authorization/util"
25
24
"github.com/openshift/origin/pkg/config/cmd"
26
25
routeapi "github.com/openshift/origin/pkg/route/apis/route"
27
26
templateapi "github.com/openshift/origin/pkg/template/apis/template"
28
27
"github.com/openshift/origin/pkg/templateservicebroker/openservicebroker/api"
28
+ "github.com/openshift/origin/pkg/templateservicebroker/util"
29
29
)
30
30
31
31
func evaluateJSONPathExpression (obj interface {}, annotation , expression string , base64encode bool ) (string , error ) {
@@ -158,7 +158,7 @@ func (b *Broker) Bind(u user.Info, instanceID, bindingID string, breq *api.BindR
158
158
159
159
// end users are not expected to have access to BrokerTemplateInstance
160
160
// objects; SAR on the TemplateInstance instead.
161
- if err := util .Authorize (b .kc .Authorization ().SubjectAccessReviews (), u , & authorization .ResourceAttributes {
161
+ if err := util .Authorize (b .kc .Authorization ().SubjectAccessReviews (), u , & authorizationv1 .ResourceAttributes {
162
162
Namespace : namespace ,
163
163
Verb : "get" ,
164
164
Group : templateapi .GroupName ,
@@ -200,7 +200,7 @@ func (b *Broker) Bind(u user.Info, instanceID, bindingID string, breq *api.BindR
200
200
return api .InternalServerError (err )
201
201
}
202
202
203
- if err := util .Authorize (b .kc .Authorization ().SubjectAccessReviews (), u , & authorization .ResourceAttributes {
203
+ if err := util .Authorize (b .kc .Authorization ().SubjectAccessReviews (), u , & authorizationv1 .ResourceAttributes {
204
204
Namespace : object .Ref .Namespace ,
205
205
Verb : "get" ,
206
206
Group : object .Ref .GroupVersionKind ().Group ,
@@ -249,7 +249,7 @@ func (b *Broker) Bind(u user.Info, instanceID, bindingID string, breq *api.BindR
249
249
if status == http .StatusCreated { // binding not found; create it
250
250
// end users are not expected to have access to BrokerTemplateInstance
251
251
// objects; SAR on the TemplateInstance instead.
252
- if err := util .Authorize (b .kc .Authorization ().SubjectAccessReviews (), u , & authorization .ResourceAttributes {
252
+ if err := util .Authorize (b .kc .Authorization ().SubjectAccessReviews (), u , & authorizationv1 .ResourceAttributes {
253
253
Namespace : namespace ,
254
254
Verb : "update" ,
255
255
Group : templateapi .GroupName ,
0 commit comments