Skip to content

Conversation

@alexandrexaviersm
Copy link
Contributor

No description provided.

Comment on lines +11 to +16
def safe_module_function?(DockYardWeb.EmployeeView, :random_avatar_uri), do: true
def safe_module_function?(DockYardWeb.EmployeeView, :display_name), do: true
def safe_module_function?(DockYardWeb.PostView, :illustration), do: true
def safe_module_function?(DockYardWeb.PostView, :post_path), do: true
def safe_module_function?(DockYardWeb.PostView, :author_avatar_url), do: true
def safe_module_function?(DockYard.ClientLeads, :change_client_lead_form), do: true
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need to think of a way to remove this, it's trying to validate AST like this one:

{:., [line: 95], [{:__aliases__, [line: 95], [:DockYardWeb, :EmployeeView]}, :display_name]}

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alexandrexaviersm safe_code allows the application using it to specify its own safe functions. We are doing this in Beacon, but I need to expose a way for users using Beacon to tag safe functions. I am working on a PR for this now. You can remove these lines from this PR.

Comment on lines +11 to +16
def safe_module_function?(DockYardWeb.EmployeeView, :random_avatar_uri), do: true
def safe_module_function?(DockYardWeb.EmployeeView, :display_name), do: true
def safe_module_function?(DockYardWeb.PostView, :illustration), do: true
def safe_module_function?(DockYardWeb.PostView, :post_path), do: true
def safe_module_function?(DockYardWeb.PostView, :author_avatar_url), do: true
def safe_module_function?(DockYard.ClientLeads, :change_client_lead_form), do: true
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alexandrexaviersm safe_code allows the application using it to specify its own safe functions. We are doing this in Beacon, but I need to expose a way for users using Beacon to tag safe functions. I am working on a PR for this now. You can remove these lines from this PR.

Comment on lines +31 to +36

# def safe_module_function?(module, function) do
# IO.inspect("module: #{inspect(module)}")
# IO.inspect("function: #{function}")
# true
# end
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# def safe_module_function?(module, function) do
# IO.inspect("module: #{inspect(module)}")
# IO.inspect("function: #{function}")
# true
# end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants