Project

General

Profile

« Previous | Next » 

Revision c6fe437b

Added by Andreas Kohlbecker over 7 years ago

fix #6115 protecting all cdm content with new permission

View differences:

modules/cdm_dataportal/cdm_dataportal.module
412 412
      'administer cdm_dataportal' => array(
413 413
        'title' => t('Administer CDM DataPortal settings'),
414 414
        'description' => t("Access the settings pages specific for the cdm_dataportal module"),
415
      )
415
      ),
416
      'access cdm content' => array(
417
        'title' => t('Access CDM content'),
418
        'description' => t("Access content (taxa, names, specimens, etc.) served by the CDM web service."),
419
      ),
416 420
    );
417 421
  }
418 422

  
......
428 432

  
429 433
  $items['cdm_dataportal/names'] = array(
430 434
    'page callback' => 'cdm_dataportal_view_names',
431
    'access arguments' => array('access content'),
435
    'access arguments' => array('access cdm content'),
432 436
    'type' => MENU_CALLBACK,
433 437
  );
434 438

  
435 439
  // Optional callback arguments: page.
436 440
  $items['cdm_dataportal/taxon'] = array(
437 441
    'page callback' => 'cdm_dataportal_taxon_page_view',
438
    'access arguments' => array('access content'),
442
    'access arguments' => array('access cdm content'),
439 443
    'type' => MENU_CALLBACK,
440 444
    // Expected callback arguments: uuid.
441 445
  );
......
444 448
    //FIXME point to view/page method in this module
445 449
    $items['cdm_dataportal/specimen'] = array(
446 450
        'page callback' => 'cdm_dataportal_specimen_page_view',
447
        'access arguments' => array('access content'),
451
        'access arguments' => array('access cdm content'),
448 452
        'type' => MENU_CALLBACK,
449 453
        // Expected callback arguments: uuid.
450 454
    );
......
458 462
       'synonym_uuid' => NULL
459 463
      ),
460 464
      */
461
    'access arguments' => array('access content'),
465
    'access arguments' => array('access cdm content'),
462 466
    'type' => MENU_CALLBACK,
463 467
    // Expected callback arguments: uuid.
464 468
  );
465 469

  
466 470
  $items['cdm_dataportal/reference'] = array(
467 471
    'page callback' => 'cdm_dataportal_view_reference',
468
    'access arguments' => array('access content'),
472
    'access arguments' => array('access cdm content'),
469 473
    'type' => MENU_CALLBACK,
470 474
    // Expected callback arguments: uuid.
471 475
  );
472 476

  
473 477
  $items['cdm_dataportal/reference/list'] = array(
474 478
    'page callback' => 'cdm_dataportal_view_reference_list',
475
    'access arguments' => array('access content'),
479
    'access arguments' => array('access cdm content'),
476 480
    'type' => MENU_CALLBACK,
477 481
    // Expected callback arguments: uuid.
478 482
  );
479 483

  
480 484
  $items['cdm_dataportal/media'] = array(
481 485
    'page callback' => 'cdm_dataportal_view_media',
482
    'access arguments' => array('access content'),
486
    'access arguments' => array('access cdm content'),
483 487
    'type' => MENU_CALLBACK,
484 488
    // Expected callback arguments:
485 489
    // uuid, mediarepresentation_uuid, part_uuid or part#.
......
487 491

  
488 492
  $items['cdm_dataportal/polytomousKey'] = array(
489 493
    'page callback' => 'cdm_dataportal_view_polytomousKey',
490
    'access arguments' => array('access content'),
494
    'access arguments' => array('access cdm content'),
491 495
    'type' => MENU_CALLBACK,
492 496
    // Expected callback arguments: polytomousKey->uuid.
493 497
  );
494 498

  
495 499
  $items['cdm_dataportal/search'] = array(
496 500
    'page callback' => 'cdm_dataportal_view_search_advanced',
497
    'access arguments' => array('access content'),
501
    'access arguments' => array('access cdm content'),
498 502
    'type' => MENU_CALLBACK,
499 503
  );
500 504

  
501 505
  $items['cdm_dataportal/search/advanced'] = array(
502 506
    'title' => 'Advanced', // will be passed through t()
503 507
    'page callback' => 'cdm_dataportal_view_search_advanced',
504
    'access arguments' => array('access content'),
508
    'access arguments' => array('access cdm content'),
505 509
    'type' => MENU_DEFAULT_LOCAL_TASK,
506 510
  );
507 511

  
508 512
  $items['cdm_dataportal/search/taxon_by_description'] = array(
509 513
    'title' => 'By content category', // will be passed through t()
510 514
    'page callback' => 'cdm_dataportal_view_search_taxon_by_description',
511
    'access arguments' => array('access content'),
515
    'access arguments' => array('access cdm content'),
512 516
    'type' => MENU_LOCAL_TASK,
513 517
  );
514 518

  
515 519
  $items['cdm_dataportal/search/results/taxon'] = array(
516 520
    'page callback' => 'cdm_dataportal_view_search_results_taxon',
517
    'access arguments' => array('access content'),
521
    'access arguments' => array('access cdm content'),
518 522
    'type' => MENU_CALLBACK,
519 523
  );
520 524
  /*
521 525
   $items['cdm/xml2json'] = array(
522 526
   'page callback' => 'cdm_view_xml2json',
523
   'access arguments' => array('access content'),
527
   'access arguments' => array('access cdm content'),
524 528
   'type' => MENU_CALLBACK,
525 529
   );
526 530
   */
......
529 533
  // User configuration of cdm_dataportal.
530 534
  $items['user/%/cdm_dataportal'] = array(
531 535
    'title' => 'cdm_dataportal',
532
    'access arguments' => array('access content'),
536
    'access arguments' => array('access cdm content'),
533 537
    'page callback' => 'drupal_get_form',
534 538
    'page arguments' => array('cdm_dataportal_user_form'),
535 539
    'type' => MENU_LOCAL_TASK,
......
542 546
    // 'page callback' => 'cdm_dataportal_view_name',
543 547
    'page callback' => 'cdm_dataportal_name_page_view',
544 548
    'page arguments' => array(2, 3, 4),
545
    'access arguments' => array('access content'),
549
    'access arguments' => array('access cdm content'),
546 550
    'type' => MENU_CALLBACK,
547 551
  );
548 552

  
......
553 557
      'title' => '@tabname',
554 558
      'title arguments' => array('@tabname' => theme('cdm_taxonpage_tab', array('tabname' => 'General'))),
555 559
      'page callback' => 'cdm_dataportal_taxon_page_view',
556
      'access arguments' => array('access content'),
560
      'access arguments' => array('access cdm content'),
557 561
      'type' => MENU_CALLBACK,
558 562
      'weight' => 1,
559 563
      'page arguments' => array(2, "description")
......
564 568
      'title' => '@tabname',
565 569
      'title arguments' => array('@tabname' => theme('cdm_taxonpage_tab', array('tabname' => 'General'))),
566 570
      'page callback' => 'cdm_dataportal_taxon_page_view',
567
      'access arguments' => array('access content'),
571
      'access arguments' => array('access cdm content'),
568 572
      'type' => MENU_CALLBACK,
569 573
      'weight' => 2,
570 574
      'page arguments' => array(2, "all")
......
575 579
      'title' => '@tabname',
576 580
      'title arguments' => array('@tabname' => theme('cdm_taxonpage_tab', array('tabname' => 'General'))),
577 581
      'page callback' => 'cdm_dataportal_taxon_page_view',
578
      'access arguments' => array('access content'),
582
      'access arguments' => array('access cdm content'),
579 583
      'type' => MENU_DEFAULT_LOCAL_TASK,
580 584
      'weight' => 2,
581 585
      'page arguments' => array(2, "description")
......
586 590
      'title' => '@tabname',
587 591
      'title arguments' => array('@tabname' => theme('cdm_taxonpage_tab', array('tabname' => 'Synonymy'))),
588 592
      'page callback' => 'cdm_dataportal_taxon_page_view',
589
      'access arguments' => array('access content'),
593
      'access arguments' => array('access cdm content'),
590 594
      'type' => MENU_LOCAL_TASK,
591 595
      'weight' => 4,
592 596
      'page arguments' => array(2, "synonymy", 4)
......
596 600
      'title' => '@tabname',
597 601
      'title arguments' => array('@tabname' => theme('cdm_taxonpage_tab', array('tabname' => 'Images'))),
598 602
      'page callback' => 'cdm_dataportal_taxon_page_view',
599
      'access arguments' => array('access content'),
603
      'access arguments' => array('access cdm content'),
600 604
      'type' => MENU_LOCAL_TASK,
601 605
      'weight' => 5,
602 606
      'page arguments' => array(2, "images")
......
607 611
      'title' => '@tabname',
608 612
      'title arguments' => array('@tabname' => theme('cdm_taxonpage_tab', array('tabname' => 'Specimens'))),
609 613
      'page callback' => 'cdm_dataportal_taxon_page_view',
610
      'access arguments' => array('access content'),
614
      'access arguments' => array('access cdm content'),
611 615
      'type' => MENU_LOCAL_TASK,
612 616
      'weight' => 6,
613 617
      'page arguments' => array(2, "specimens")
......
618 622
      'title' => '@tabname',
619 623
      'title arguments' => array('@tabname' => theme('cdm_taxonpage_tab', array('tabname' => 'Keys'))),
620 624
      'page callback' => 'cdm_dataportal_taxon_page_view',
621
      'access arguments' => array('access content'),
625
      'access arguments' => array('access cdm content'),
622 626
      'type' => MENU_LOCAL_TASK,
623 627
      'weight' => 6,
624 628
      'page arguments' => array(2, "keys")
......
629 633
      'title' => '@tabname',
630 634
      'title arguments' => array('@tabname' => theme('cdm_taxonpage_tab', array('tabname' => 'Experts'))),
631 635
        'page callback' => 'cdm_dataportal_taxon_page_view',
632
        'access arguments' => array('access content'),
636
        'access arguments' => array('access cdm content'),
633 637
        'type' => MENU_LOCAL_TASK,
634 638
        'weight' => 6,
635 639
        'page arguments' => array(2, "experts")
......
638 642

  
639 643
    $items['cdm_dataportal/taxon/autosuggest/%/%/%/'] = array(
640 644
        'page callback' => 'cdm_dataportal_taxon_autosuggest',
641
        'access arguments' => array('access taxon autosuggest'),
645
        'access arguments' => array('access cdm content'),
642 646
        'page arguments' => array(3,4,5),
643 647
        'type' => MENU_CALLBACK
644 648
    );

Also available in: Unified diff