Skip to content

Commit

Permalink
Merge d501d2f into 42c9945
Browse files Browse the repository at this point in the history
  • Loading branch information
izidormatusov committed Feb 10, 2014
2 parents 42c9945 + d501d2f commit 3df1fd4
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions oscar/apps/dashboard/nav.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,14 @@ def is_visible(self, user):
def filter(self, user):
if not self.is_visible(user):
return None
node = Node(self.label, self.url_name, self.access_fn)
node = Node(
label=self.label,
url_name=self.url_name,
url_args=self.url_args,
url_kwargs=self.url_kwargs,
access_fn=self.access_fn,
icon=self.icon,
)
for child in self.children:
if child.is_visible(user):
node.add_child(child)
Expand All @@ -54,7 +61,7 @@ def get_nodes(user):
for node in all_nodes:
filtered_node = node.filter(user)
if filtered_node:
visible_nodes.append(node)
visible_nodes.append(filtered_node)
return visible_nodes


Expand Down

0 comments on commit 3df1fd4

Please sign in to comment.