mirror of
https://github.com/getredash/redash.git
synced 2025-12-23 03:13:08 -05:00
13 lines
409 B
JavaScript
13 lines
409 B
JavaScript
(function () {
|
|
var Dashboard = function($resource) {
|
|
var resource = $resource('/api/dashboards/:slug', {slug: '@slug'});
|
|
resource.prototype.canEdit = function() {
|
|
return currentUser.hasPermission('admin') || currentUser.canEdit(this);
|
|
}
|
|
return resource;
|
|
}
|
|
|
|
angular.module('redash.services')
|
|
.factory('Dashboard', ['$resource', Dashboard])
|
|
})();
|