You are here

function _xmlsitemap_rebuild_form_access in XML sitemap 8

Same name and namespace in other branches
  1. 6.2 xmlsitemap.module \_xmlsitemap_rebuild_form_access()
  2. 7.2 xmlsitemap.module \_xmlsitemap_rebuild_form_access()
  3. 2.x xmlsitemap.module \_xmlsitemap_rebuild_form_access()

Menu access callback; determines if the user can use the rebuild links page.

Return value

bool Returns TRUE if current user can access rebuild form. FALSE otherwise.

File

./xmlsitemap.module, line 171
xmlsitemap XML sitemap

Code

function _xmlsitemap_rebuild_form_access() {
  $rebuild_types = xmlsitemap_get_rebuildable_link_types();
  return !empty($rebuild_types) && \Drupal::currentUser()
    ->hasPermission('administer xmlsitemap');
}