Use afb_token in contexts
[src/app-framework-binder.git] / src / afb-auth.c
index 4a3c445..6747c9e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016, 2017, 2018 "IoT.bzh"
+ * Copyright (C) 2016-2019 "IoT.bzh"
  * Author "Fulup Ar Foll"
  * Author José Bollo <jose.bollo@iot.bzh>
  *
@@ -62,7 +62,7 @@ int afb_auth_check(struct afb_xreq *xreq, const struct afb_auth *auth)
 
 int afb_auth_has_permission(struct afb_xreq *xreq, const char *permission)
 {
-       return afb_cred_has_permission(xreq->cred, permission, afb_context_uuid(&xreq->context));
+       return afb_cred_has_permission(xreq->cred, permission, &xreq->context);
 }
 
 /*********************************************************************************/