Sophie

Sophie

distrib > Mageia > 7 > i586 > by-pkgid > 4e237fd705495e1e21ef20696443e053 > files > 1048

bugzilla-5.0.4-3.mga7.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
  <head>
    <title>
Bugzilla::Group</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <link rel="stylesheet" title="style" type="text/css" href=".././../../../../style.css" media="all" >

</head>
  <body id="pod">
<p class="backlinktop"><b><a name="___top" href="../index.html" accesskey="1" title="All Documents">&lt;&lt;</a></b></p>
<h1>Bugzilla::Group</h1>
<div class='indexgroup'>
<ul   class='indexList indexList1'>
  <li class='indexItem indexItem1'><a href='#NAME'>NAME</a>
  <li class='indexItem indexItem1'><a href='#SYNOPSIS'>SYNOPSIS</a>
  <li class='indexItem indexItem1'><a href='#DESCRIPTION'>DESCRIPTION</a>
  <li class='indexItem indexItem1'><a href='#SUBROUTINES'>SUBROUTINES</a>
  <li class='indexItem indexItem1'><a href='#METHODS'>METHODS</a>
  <li class='indexItem indexItem1'><a href='#Methods_in_need_of_POD'>Methods in need of POD</a>
</ul>
</div>

<h1><a class='u' href='#___top' title='click to go to top of document'
name="NAME"
>NAME</a></h1>

<p>Bugzilla::Group - Bugzilla group class.</p>

<h1><a class='u' href='#___top' title='click to go to top of document'
name="SYNOPSIS"
>SYNOPSIS</a></h1>

<pre  class="code">    use Bugzilla::Group;

    my $group = new Bugzilla::Group(1);
    my $group = new Bugzilla::Group({name =&#62; &#39;AcmeGroup&#39;});

    my $id           = $group-&#62;id;
    my $name         = $group-&#62;name;
    my $description  = $group-&#62;description;
    my $user_reg_exp = $group-&#62;user_reg_exp;
    my $is_active    = $group-&#62;is_active;
    my $icon_url     = $group-&#62;icon_url;
    my $is_active_bug_group = $group-&#62;is_active_bug_group;

    my $group_id = Bugzilla::Group::ValidateGroupName(&#39;admin&#39;, @users);
    my @groups   = Bugzilla::Group-&#62;get_all;</pre>

<h1><a class='u' href='#___top' title='click to go to top of document'
name="DESCRIPTION"
>DESCRIPTION</a></h1>

<p>Group.pm represents a Bugzilla Group object. It is an implementation of <a href="../Bugzilla/Object.html" class="podlinkpod"
>Bugzilla::Object</a>, and thus has all the methods that <a href="../Bugzilla/Object.html" class="podlinkpod"
>Bugzilla::Object</a> provides, in addition to any methods documented below.</p>

<h1><a class='u' href='#___top' title='click to go to top of document'
name="SUBROUTINES"
>SUBROUTINES</a></h1>

<dl>
<dt><a name="create"
><code  class="code">create</code></a></dt>

<dd>
<p>Note that in addition to what <a href="../Bugzilla/Object.html#create(%24params)" class="podlinkpod"
>&#34;create($params)&#34; in Bugzilla::Object</a> normally does, this function also makes the new group be inherited by the <code  class="code">admin</code> group and optionally inserts access controls for this group into all existing products. That is, the <code  class="code">admin</code> group will automatically be a member of this group and bugs for all products may optionally be restricted to this group by group members.</p>

<dt><a name="ValidateGroupName($name,_@users)"
><code  class="code">ValidateGroupName($name, @users)</code></a></dt>

<dd>
<p>Description: ValidateGroupName checks to see if ANY of the users in the provided list of user objects can see the named group.</p>

<p>Params: $name - String with the group name. @users - An array with Bugzilla::User objects.</p>

<p>Returns: It returns the group id if successful and undef otherwise.</p>
</dd>
</dl>

<h1><a class='u' href='#___top' title='click to go to top of document'
name="METHODS"
>METHODS</a></h1>

<dl>
<dt><a name="check_no_disclose"
><code  class="code">check_no_disclose</code></a></dt>

<dd>
<dl>
<dt><a name="Description"
><b>Description</b></a></dt>

<dd>
<p>Throws an error if the user cannot add or remove this group to/from a given bug, but doesn&#39;t specify if this is because the group doesn&#39;t exist, or the user is not allowed to edit this group restriction.</p>

<dt><a name="Params"
><b>Params</b></a></dt>

<dd>
<p>This method takes a single hashref as argument, with the following keys:</p>

<dl>
<dt><a name="name"
><code  class="code">name</code></a></dt>

<dd>
<p><code  class="code">string</code> The name of the group to add or remove.</p>

<dt><a name="bug_id"
><code  class="code">bug_id</code></a></dt>

<dd>
<p><code  class="code">integer</code> The ID of the bug to which the group change applies.</p>

<dt><a name="product"
><code  class="code">product</code></a></dt>

<dd>
<p><code  class="code">string</code> The name of the product the bug belongs to.</p>

<dt><a name="action"
><code  class="code">action</code></a></dt>

<dd>
<p><code  class="code">string</code> Must be either <code  class="code">add</code> or <code  class="code">remove</code>, depending on whether the group must be added or removed from the bug. Any other value will generate an error.</p>
</dd>
</dl>

<dt><a name="Returns"
><code  class="code">Returns</code></a></dt>

<dd>
<p>A <code  class="code">Bugzilla::Group</code> object on success, else an error is thrown.</p>
</dd>
</dl>

<dt><a name="check_members_are_visible"
><code  class="code">check_members_are_visible</code></a></dt>

<dd>
<p>Throws an error if this group is not visible (according to visibility groups) to the currently-logged-in user.</p>

<dt><a name="check_remove"
><code  class="code">check_remove</code></a></dt>

<dd>
<dl>
<dt><a name="Description"
><b>Description</b></a></dt>

<dd>
<p>Determines whether it&#39;s OK to remove this group from the database, and throws an error if it&#39;s not OK.</p>

<dt><a name="Params"
><b>Params</b></a></dt>

<dd>
<dl>
<dt><a name="test_only"
><code  class="code">test_only</code></a></dt>

<dd>
<p><code  class="code">boolean</code> If you want to only check if the group can be deleted <i>at all</i>, under any circumstances, specify <code  class="code">test_only</code> to just do the most basic tests (the other parameters will be ignored in this situation, as those tests won&#39;t be run).</p>

<dt><a name="remove_from_users"
><code  class="code">remove_from_users</code></a></dt>

<dd>
<p><code  class="code">boolean</code> True if it would be OK to remove all users who are in this group from this group.</p>

<dt><a name="remove_from_bugs"
><code  class="code">remove_from_bugs</code></a></dt>

<dd>
<p><code  class="code">boolean</code> True if it would be OK to remove all bugs that are in this group from this group.</p>

<dt><a name="remove_from_flags"
><code  class="code">remove_from_flags</code></a></dt>

<dd>
<p><code  class="code">boolean</code> True if it would be OK to stop all flagtypes that reference this group from referencing this group (e.g., as their grantgroup or requestgroup).</p>

<dt><a name="remove_from_products"
><code  class="code">remove_from_products</code></a></dt>

<dd>
<p><code  class="code">boolean</code> True if it would be OK to remove this group from all group controls on products.</p>
</dd>
</dl>

<dt><a name="Returns_(nothing)"
><b>Returns</b> (nothing)</a></dt>
</dl>

<dt><a name="members_non_inherited"
><code  class="code">members_non_inherited</code></a></dt>

<dd>
<p>Returns an arrayref of <a href="../Bugzilla/User.html" class="podlinkpod"
>Bugzilla::User</a> objects representing people who are &#34;directly&#34; in this group, meaning that they&#39;re in it because they match the group regular expression, or they have been actually added to the group manually.</p>

<dt><a name="flatten_group_membership"
><code  class="code">flatten_group_membership</code></a></dt>

<dd>
<p>Accepts a list of groups and returns a list of all the groups whose members inherit membership in any group on the list. So, we can determine if a user is in any of the groups input to flatten_group_membership by querying the user_group_map for any user with DIRECT or REGEXP membership IN() the list of groups returned.</p>
</dd>
</dl>

<h1><a class='u' href='#___top' title='click to go to top of document'
name="Methods_in_need_of_POD"
><b>Methods in need of POD</b></a></h1>

<dl>
<dt><a name="icon_url"
>icon_url</a></dt>

<dd>
<dt><a name="set_name"
>set_name</a></dt>

<dd>
<dt><a name="bugs"
>bugs</a></dt>

<dd>
<dt><a name="granted_by_direct"
>granted_by_direct</a></dt>

<dd>
<dt><a name="set_user_regexp"
>set_user_regexp</a></dt>

<dd>
<dt><a name="flag_types"
>flag_types</a></dt>

<dd>
<dt><a name="products"
>products</a></dt>

<dd>
<dt><a name="set_icon_url"
>set_icon_url</a></dt>

<dd>
<dt><a name="set_description"
>set_description</a></dt>

<dd>
<dt><a name="set_is_active"
>set_is_active</a></dt>

<dd>
<dt><a name="user_regexp"
>user_regexp</a></dt>

<dd>
<dt><a name="members_direct"
>members_direct</a></dt>

<dd>
<dt><a name="is_bug_group"
>is_bug_group</a></dt>

<dd>
<dt><a name="grant_direct"
>grant_direct</a></dt>

<dd>
<dt><a name="description"
>description</a></dt>

<dd>
<dt><a name="is_active"
>is_active</a></dt>

<dd>
<dt><a name="remove_from_db"
>remove_from_db</a></dt>

<dd>
<dt><a name="is_active_bug_group"
>is_active_bug_group</a></dt>

<dd>
<dt><a name="update"
>update</a></dt>
</dl>
<p class="backlinkbottom"><b><a name="___bottom" href="../index.html" title="All Documents">&lt;&lt;</a></b></p>

<!-- end doc -->

</body></html>