0002-misc-allow-hiding-of-endpoints-27782.patch
passerelle/templates/passerelle/manage/service_view.html | ||
---|---|---|
64 | 64 |
{% block endpoints %} |
65 | 65 |
<ul class="endpoints"> |
66 | 66 |
{% for endpoint in object.get_endpoints_infos %} |
67 |
{% include "passerelle/manage/endpoint.html" with endpoint=endpoint %} |
|
67 |
{% if endpoint.show %} |
|
68 |
{% include "passerelle/manage/endpoint.html" with endpoint=endpoint %} |
|
69 |
{% endif %} |
|
68 | 70 |
{% endfor %} |
69 | 71 |
</ul> |
70 | 72 |
{% endblock %} |
passerelle/utils/api.py | ||
---|---|---|
42 | 42 |
example_pattern=None, |
43 | 43 |
parameters=None, |
44 | 44 |
cache_duration=None, |
45 |
post=None): |
|
45 |
post=None, |
|
46 |
show=True): |
|
46 | 47 |
self.perm = perm |
47 | 48 |
self.methods = methods |
48 | 49 |
self.serializer_type = serializer_type |
... | ... | |
69 | 70 |
self.descriptions['post'] = post.get('description') |
70 | 71 |
if post.get('long_description'): |
71 | 72 |
self.long_descriptions['post'] = post.get('long_description') |
73 |
self.show = show |
|
72 | 74 | |
73 | 75 |
def __call__(self, func): |
74 | 76 |
func.endpoint_info = self |
75 |
- |