Description

Roles classes module is used to add user's roles as classes in page body.

Project link

https://www.drupal.org/project/body_roles_classes

Comments

dkmishra created an issue. See original summary.

batigolix’s picture

Status: Needs review » Needs work

This module only consists only of one hook implementation:

/**
 * Implements hook_preprocess_HOOK().
 */
function body_roles_classes_preprocess_html(&$variables) {
  $role_classes = '';
  $roles = \Drupal::currentUser()->getRoles();
  if (count($roles) > 0) {
	  $role_classes = implode(' ', $roles);
	  $variables['attributes']['class'][] = $role_classes;	
  }
}

See https://www.drupal.org/node/1587704#s-ensure-the-branch-used-for-the-app... :

PHP code is used to verify what the users who apply understand about writing Drupal code. It's not possible to understand that when the project contains few code lines (for example, a single hook implementation).

For this reason this module can not be reviewed.

I'll set status to postponed as I am not sure whether to directly close this application.

batigolix’s picture

Status: Needs work » Postponed (maintainer needs more info)
vishal.kadam’s picture

Title: [8.x-1] Roles Classes » [8.x-1.x] Roles Classes
Issue summary: View changes
vishal.kadam’s picture

Status: Postponed (maintainer needs more info) » Needs work

Usually, after reviewing a project, we allow the developer to opt projects into security advisory coverage. This project is too small for us; it does not contain enough Drupal code to really assess your skills as a developer.

Do you have any other project hosted on drupal.org that we could instead review? It needs to have most of the commits (but preferably all the commits) done by you, in at least a branch.

dkmishra’s picture

Thank you for the feedback!

avpaderno’s picture

Status: Needs work » Closed (duplicate)
Related issues: +#3587377: [2.0.x] Vote Anonymous

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.