Skip to content

Possible dead code: handle_get_permission in Member (contains a likely typo arke_id: "ake") #35

Description

@lupodevelop

While reading arke_auth/core/member.ex I noticed a likely typo at:

arke_member_public = QueryManager.get_by(project: project, arke_id: "ake", id: "member_public")

"ake" : should this be "arke"?

Before sending a fix, I tried to check whether the line is actually reachable, and it looks like handle_get_permission has no call site:

  • It's a defp (line 89), and I couldn't find any caller in the module nor in the repos I looked through.

  • Elixir reports the whole block as unused:

member.ex:89  warning: function handle_get_permission/2 is unused
member.ex:91  warning: variable "arke_member_public" is unused
              warning: function permission_dict/1 is unused
              warning: function get_permission_dict/2 is unused
              warning: function get_parent_list/1 is unused

If that's right, the typo never executes, and arke_member_public is never read anyway.

Questions:

Is handle_get_permission (+ its private helpers) leftover from an older implementation?
Or is it meant to be wired back in?

In that case the "ake" → "arke" typo would be worth fixing at the same time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions