Skip to content

Commit

Permalink
Merge pull request #922 from hashmapinc/Tempus-906
Browse files Browse the repository at this point in the history
Tempus-906-Remove gatway option for customeruser
  • Loading branch information
VikashSingh94 committed Jan 13, 2019
2 parents 86dd62a + 45b7ae7 commit 2eb188f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ui/src/app/device/device-fieldset.tpl.html
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
ng-model="device.type"
entity-type="types.entityType.device">
</tb-entity-subtype-autocomplete>
<md-input-container class="md-block">
<md-input-container class="md-block" ng-if = "authority !== 'CUSTOMER_USER'">
<md-checkbox ng-disabled="$root.loading || !isEdit" flex aria-label="{{ 'device.is-gateway' | translate }}"
ng-model="device.additionalInfo.gateway">{{ 'device.is-gateway' | translate }}
</md-checkbox>
Expand Down
4 changes: 3 additions & 1 deletion ui/src/app/device/device.directive.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ import deviceFieldsetTemplate from './device-fieldset.tpl.html';
/* eslint-enable import/no-unresolved, import/default */

/*@ngInject*/
export default function DeviceDirective($compile,$templateCache,datamodelService, toast, $translate, types, clipboardService, deviceService, customerService) {

export default function DeviceDirective($compile,$rootScope,$templateCache,datamodelService, toast, $translate, types, clipboardService, deviceService, customerService) {
var linker = function (scope, element) {
var template = $templateCache.get(deviceFieldsetTemplate);
element.html(template);
Expand All @@ -34,6 +35,7 @@ export default function DeviceDirective($compile,$templateCache,datamodelService
scope.isAssignedToDataModel = false;
scope.assignedToDataModelObject = false;

scope.authority = $rootScope.authority;

scope.$watch('device', function(newVal) {
if (newVal) {
Expand Down

0 comments on commit 2eb188f

Please sign in to comment.