In admin/people you can manually add a plan to users trough user operations. This works fine, however this only works with a admin account, while my customer uses a editor account. Loged in as "editor" he does not have the option to manually add a plan trough the user operation menu. In order to correct this i have added the following code to ms_membership.module :

/**
 * Implements hook_permission().
 */
function ms_membership_permission() {
  return array(
    'administer ms memberships' => array(
      'title' => t('Administer ms memberships'),
      'description' => t('Administer ms memberships.'),
      'restrict access' => TRUE,)
     
  );
}

I hope this will help anyone who faces the same issue.

Kind regards,
Tavorick

CommentFileSizeAuthor
#5 2) Img.png98.82 KBrenatog
#5 1) Img.png40.78 KBrenatog
#3 2828763-3.patch611 bytescebasqueira

Comments

tavorick created an issue. See original summary.

cebasqueira’s picture

Assigned: Unassigned » cebasqueira
cebasqueira’s picture

Assigned: cebasqueira » Unassigned
Status: Active » Needs review
StatusFileSize
new611 bytes
renatog’s picture

Assigned: Unassigned » renatog
renatog’s picture

Assigned: renatog » Unassigned
Status: Needs review » Reviewed & tested by the community
StatusFileSize
new40.78 KB
new98.82 KB

Hi.

I applied the patch and works fine for me.

Follow images bellow:

Img

Img

Regards.

larruda’s picture

Maintainer notified by email.

Tavorick’s picture

Sweet, now lets hope it gets integrated with the module.

Farreres’s picture

Yes, I am about to apply the patch. But I would like to do it correctly following drupal standards. I am using giteye for the task. I usually download the patch, apply to my local deb install and upload. But do you know if there is a more proper way of doing this? Also, I don't know how to properly cite authorship and patch ID along with comment ID. I am quite new to module admin in drupal, if someone can help me in this...

larruda’s picture

Hi @Farreres. Please follow this guide here in order to apply the patch: https://www.drupal.org/patch/apply. You need to be in the module's git repository, then after patching it, you need to commit the changes. To do that "the right way" you need to use the "Git command" generated by this same page in the bottom, which is:

git commit -m 'Issue #2828763 by cebasqueira, renatog: ms_membership_user_operations' --author="git <git@3224891.no-reply.drupal.org>"

You can use -am instead of -m to add the changes to Git staging and commit at the same time. After that, push your changes to remote. If everything went file, refresh the page here and a message about the commit should appear right below this comment. Finally you can change the status of this issue to Fixed and right before saving don't forget to give proper credit to those who contributed here by checking their names in the Credit & committing fieldset right below.

Thanks!

renatog’s picture

Issue tags: +ciandt-contrib