Scott Baker | 8e6647a | 2016-06-20 17:16:20 -0700 | [diff] [blame] | 1 | from core.models import User, TenantRootPrivilege, TenantRootRole |
Scott Baker | c15556d | 2017-05-06 09:55:01 -0700 | [diff] [blame] | 2 | from services.rcord.models import CordSubscriberRoot |
Scott Baker | 8e6647a | 2016-06-20 17:16:20 -0700 | [diff] [blame] | 3 | from xosresource import XOSResource |
| 4 | |
| 5 | class XOSCORDSubscriber(XOSResource): |
| 6 | provides = "tosca.nodes.CORDSubscriber" |
| 7 | xos_model = CordSubscriberRoot |
| 8 | copyin_props = ["service_specific_id", "firewall_enable", "url_filter_enable", "cdn_enable", "url_filter_level"] |
| 9 | |
| 10 | def postprocess(self, obj): |
| 11 | rolemap = ( ("tosca.relationships.AdminPrivilege", "admin"), ("tosca.relationships.AccessPrivilege", "access"), ) |
| 12 | self.postprocess_privileges(TenantRootRole, TenantRootPrivilege, rolemap, obj, "tenant_root") |
| 13 | |
| 14 | def can_delete(self, obj): |
| 15 | return super(XOSCORDSubscriber, self).can_delete(obj) |
| 16 | |