Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6059457
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T08:42:45+00:00 2026-05-23T08:42:45+00:00

Why are my permissions not being applied? $items[‘admin/mymodule’] = array( ‘page callback’ => ‘mymodule_admin’,

  • 0

Why are my permissions not being applied?


$items['admin/mymodule'] = array(
    'page callback' => 'mymodule_admin',
    'access arguments' => array("admin mymodule"),
    'access callback' => TRUE,
    'type' => MENU_NORMAL_ITEM,
    'file' => 'mymodule.admin.inc',
    'title' => 'mymodule',
  );

function mymodule_perm(){ return array("admin mymodule", "earnings_report"); }

When I go to Mysite/admin/mymodule, I am able to access it WITHOUT being logged in.

The permissions on admin/user/permissions are correctly set to only give access to "site developer" and "store administrator", and the anonymous user are not part of those roles.

I tried going to /admin/content/node-settings/rebuild and /admin/build/modules, but it didn't help.

The permission "earnings_report" is working as expected, but "admin mymodule" is not.

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T08:42:46+00:00Added an answer on May 23, 2026 at 8:42 am

    The 'access callback' => TRUE, line defines who can access admin/mymodule

    You’ve set it to always be TRUE which means it can always be accessed. I think you need to change it to something like:

    'access callback' => 'user_access',
    'access arguments' => array('admin mymodule'), 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Sql Server Management Studio 2008 is not scripting table permissions even when I select
I want to manage permissions and access to a SQL Server database server on
I have an array of permissions: array( array( controller => somewhere, action => ,
I am getting this error: List does not exist The page you selected contains
I feel a bit blind developing on an emulator for Android and not being
While debugging the code below, BroadcastReceiverCustom is being called but PhoneStateListenerCustom is not. For
I want to disable or also I have does not give permission entering the
To my knowledge, Java's File class does not support to change the file's permission
If I grant execute permissions to a role via GRANT EXECUTE ON [DBO].[MYPROC] TO
Does anyone know which permissions are required for refreshing or connecting to linked tables

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.