Creating a block in own module I am using Drupal 6.27, created my own module, used hook_perm() in my module. Now the question is - did i do that in the right way?

/**
 * Implementation of hook_block().
 */

function adminka_block($op = 'list', $delta = 0, $edit = array()) {
  switch($op) {
    case 'list':
      return array(
        'adminka_simple_block' =&gt; array('info' =&gt; 'adminka simple block', 'cache' =&gt; BLOCK_NO_CACHE),
      );
    case 'view':
      switch($delta) {
        case 0:
          if (user_access('view adminka')) {
            $block['subject'] = t('My admin panel');
            $block['content'] = '&lt;a href="/node/add/' . variable_get('content_type', false) . '"&gt;Добавить ' . variable_get('content_type_name', false) . '&lt;/a&gt;&lt;br /&gt;';
            $block['content'] .= '&lt;a href="/logout"&gt;Выход&lt;/a&gt;';
            break;
          }
      }
      return $block;
  }
}


Because i didn't found another way to restrict that block visiblity only to users with user_acess('view adminka').
I think you do it  in  the right way, but instead of using this

$block['content'] = '&lt;a href="/node/add/' . variable_get('content_type', false) . '"&gt;Добавить ' . variable_get('content_type_name', false) . '&lt;/a&gt;&lt;br /&gt;';
$block['content'] .= '&lt;a href="/logout"&gt;Выход&lt;/a&gt;';


you should use l function 


  This function correctly handles aliased paths, and adds an 'active'
  class attribute to links that point to the current page (for theming),
  so all internal links output by modules should be generated by this
  function if possible.


like this:

$block['content'] .= l(t('Выход'), '/logout');