Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- Client is not authorized to access this resource: ResourceName
- }
- request({
- url: this.url+endpoint,
- method: 'GET',
- headers:{
- 'Authorization': 'Bearer '+bearer,
- 'User-Agent': '...',
- 'Accept' : 'application/json',
- 'Content-Type': 'application/json'
- }
- }, (error, response, body) => {
- callback(error,response,body)
- })
- })
- request({
- url: this.url+'integration/admin/token',
- method: 'POST',
- json:{
- username: this.username,
- password: this.password
- }
- }, (error, response, body) => {
- callback(body)
- })
- public function isAllowed($resource, $privilege = null)
- {
- return $this->_aclPolicy->isAllowed($this->_aclRoleLocator-
- >getAclRoleId(), $resource, $privilege);
- }
- return true
- getAclRoleId()
- namespace MagentoFrameworkAuthorizationRoleLocator;
- class DefaultRoleLocator implements
- MagentoFrameworkAuthorizationRoleLocatorInterface
- {
- /**
- * Retrieve current role
- *
- * @return string
- */
- public function getAclRoleId()
- {
- return '';
- }
- }
Add Comment
Please, Sign In to add comment