Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow basic expressions #9

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

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