on limite l'accès au forum privé aux membres du bureau
This commit is contained in:
parent
374208ea75
commit
68ce64a64f
9 changed files with 147 additions and 69 deletions
|
@ -156,3 +156,26 @@ function autoriser_sujet_supprimer($faire, $type, $id, $qui, $opt) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
function autoriser_forum_voir($faire, $type, $id, $qui, $opt) {
|
||||
$id_auteur = $qui['id_auteur'];
|
||||
// Il faut être au moins membre
|
||||
if ($qui['statut']=='1comite'){
|
||||
// si le forum est privé, il faut être membre du bureau
|
||||
if ($id==lire_config('balint/id_rub_forum_prive')){
|
||||
if (sql_getfetsel('bureau','spip_auteurs',"id_auteur=$id_auteur")=='on'){
|
||||
return true;
|
||||
}
|
||||
else{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
// Les admins ont accès à tout
|
||||
if ($qui['statut']=='0minirezo'){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -78,5 +78,17 @@ function balint_declarer_champs_extras($champs = array()) {
|
|||
'modifier' => array('auteur' => '0minirezo')),//Seuls les admins peuvent modifier
|
||||
),
|
||||
);
|
||||
/*
|
||||
$champs['spip_auteurs']['bureau'] = array(
|
||||
'saisie' => 'case',//Type du champ (voir plugin Saisies)
|
||||
'options' => array(
|
||||
'nom' => 'bureau',
|
||||
'label' => 'Membre du bureau',
|
||||
'defaut' => '',// Valeur par défaut
|
||||
'restrictions'=>array(
|
||||
'voir' => array('auteur' => '0minirezo'),//Tout le monde peut voir
|
||||
'modifier' => array('auteur' => '0minirezo')),//Seuls les admins peuvent modifier
|
||||
),
|
||||
);*/
|
||||
return $champs;
|
||||
}
|
||||
|
|
|
@ -14,6 +14,10 @@
|
|||
else {
|
||||
?>
|
||||
|
||||
<div class="text-center h5">
|
||||
Il faut vous connecter pour accéder au forum.
|
||||
Connectez-vous avec vos identifiants ou inscrivez-vous !
|
||||
</div>
|
||||
<div class="row mt-4">
|
||||
<div class="se_connecter bloc_connexion col-lg-5">
|
||||
[(#FORMULAIRE_LOGIN{#SELF})]
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
<section class="section-top section-bottom">
|
||||
<div class="container">
|
||||
<h1>Connexion</h1>
|
||||
<div class="text-center h5">
|
||||
Connectez-vous avec vos identifiants ou inscrivez-vous !
|
||||
</div>
|
||||
<div class="row mt-4">
|
||||
<div class="se_connecter bloc_connexion col-lg-5">
|
||||
[(#FORMULAIRE_LOGIN{#ENV{url}})]
|
||||
|
|
|
@ -742,6 +742,15 @@ body{
|
|||
}
|
||||
}
|
||||
|
||||
.bouton-toggle{
|
||||
color:lightgrey;
|
||||
display: block;
|
||||
text-align: center;
|
||||
&.vert{
|
||||
color: green;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.formulaire_spip{
|
||||
fieldset legend{
|
||||
|
@ -782,11 +791,17 @@ body{
|
|||
}
|
||||
}
|
||||
}
|
||||
.docs-article {
|
||||
legend {
|
||||
width: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.docs-article {
|
||||
justify-content: left;
|
||||
display: flex;
|
||||
.une_photo {
|
||||
margin-right: 1rem;
|
||||
margin-bottom: 1.5rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
max-width: 320px;
|
||||
|
@ -824,10 +839,6 @@ body{
|
|||
padding: 0.2rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
legend {
|
||||
width: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.titre_img{
|
||||
|
@ -838,7 +849,7 @@ body{
|
|||
|
||||
.photo-premier-plan{
|
||||
margin-bottom: 1.5rem;
|
||||
border: solid 1px #BBB;
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
.container fieldset {
|
||||
|
@ -891,6 +902,7 @@ body{
|
|||
|
||||
.liste-auteurs{
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/**********************************************************************/
|
||||
|
@ -916,6 +928,10 @@ body{
|
|||
display: none;
|
||||
}
|
||||
|
||||
.editer_docs_forum{
|
||||
background: $light;
|
||||
}
|
||||
|
||||
/**********************************************************************/
|
||||
/**************************** PAGE CONTACT ****************************/
|
||||
/**********************************************************************/
|
||||
|
|
|
@ -12709,6 +12709,16 @@ body {
|
|||
background-color: #ffb284;
|
||||
}
|
||||
|
||||
.bouton-toggle {
|
||||
color: lightgrey;
|
||||
display: block;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.bouton-toggle.vert {
|
||||
color: green;
|
||||
}
|
||||
|
||||
.formulaire_spip fieldset legend {
|
||||
background: none;
|
||||
}
|
||||
|
@ -12761,15 +12771,20 @@ body {
|
|||
}
|
||||
}
|
||||
|
||||
.formulaire_editer_post .docs-article {
|
||||
.formulaire_editer_post legend {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.docs-article {
|
||||
-webkit-box-pack: left;
|
||||
justify-content: left;
|
||||
display: -webkit-box;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.formulaire_editer_post .docs-article .une_photo {
|
||||
.docs-article .une_photo {
|
||||
margin-right: 1rem;
|
||||
margin-bottom: 1.5rem;
|
||||
display: -webkit-box;
|
||||
display: flex;
|
||||
-webkit-box-orient: vertical;
|
||||
|
@ -12778,23 +12793,23 @@ body {
|
|||
max-width: 320px;
|
||||
}
|
||||
|
||||
.formulaire_editer_post .docs-article .btn_poubelle {
|
||||
.docs-article .btn_poubelle {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.formulaire_editer_post .docs-article .btn_poubelle :hover {
|
||||
.docs-article .btn_poubelle :hover {
|
||||
color: #ee9e9e;
|
||||
}
|
||||
|
||||
.formulaire_editer_post .docs-article .btn_une {
|
||||
.docs-article .btn_une {
|
||||
color: black;
|
||||
}
|
||||
|
||||
.formulaire_editer_post .docs-article .btn_une :hover {
|
||||
.docs-article .btn_une :hover {
|
||||
color: grey;
|
||||
}
|
||||
|
||||
.formulaire_editer_post .docs-article .boutons_actions {
|
||||
.docs-article .boutons_actions {
|
||||
width: 100%;
|
||||
display: -webkit-box;
|
||||
display: flex;
|
||||
|
@ -12807,16 +12822,16 @@ body {
|
|||
background-color: #f2f2f2;
|
||||
}
|
||||
|
||||
.formulaire_editer_post .docs-article .boutons_actions i.green {
|
||||
.docs-article .boutons_actions i.green {
|
||||
padding: .6rem;
|
||||
color: #1c9e1c;
|
||||
}
|
||||
|
||||
.formulaire_editer_post .docs-article .boutons_actions a {
|
||||
.docs-article .boutons_actions a {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.formulaire_editer_post .docs-article .boutons_actions .premier-plan {
|
||||
.docs-article .boutons_actions .premier-plan {
|
||||
display: -webkit-box;
|
||||
display: flex;
|
||||
-webkit-box-orient: horizontal;
|
||||
|
@ -12827,10 +12842,6 @@ body {
|
|||
padding: 0.2rem;
|
||||
}
|
||||
|
||||
.formulaire_editer_post legend {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.titre_img {
|
||||
background: #7d7d7d;
|
||||
color: white;
|
||||
|
@ -12839,7 +12850,7 @@ body {
|
|||
|
||||
.photo-premier-plan {
|
||||
margin-bottom: 1.5rem;
|
||||
border: solid 1px #BBB;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.container fieldset {
|
||||
|
@ -12892,6 +12903,7 @@ body {
|
|||
.liste-auteurs {
|
||||
-webkit-box-align: center;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/**********************************************************************/
|
||||
|
@ -12921,6 +12933,10 @@ body {
|
|||
display: none;
|
||||
}
|
||||
|
||||
.editer_docs_forum {
|
||||
background: #f8f9fa;
|
||||
}
|
||||
|
||||
/**********************************************************************/
|
||||
/**************************** PAGE CONTACT ****************************/
|
||||
/**********************************************************************/
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
[(#INFO_ORDRE{mots,#ENV{id_mot}}|set{ordre})]
|
||||
|
||||
[(#GET{ordre}|=={DESC}|?{
|
||||
[(#ENV{ordre}|=={DESC}|?{
|
||||
#SET{tri,1},
|
||||
#SET{tri,0}
|
||||
})]
|
||||
|
@ -12,10 +10,11 @@
|
|||
|
||||
<?php if (isset($GLOBALS['visiteur_session']['statut']) AND $GLOBALS['visiteur_session']['statut'] == '0minirezo') { ?>
|
||||
[(#ENV{id_forum}|non)
|
||||
<INCLURE{fond=inclure/bouton_ordre,env,ordre=#GET{ordre,DESC},objet=mot}>
|
||||
<INCLURE{fond=inclure/bouton_ordre,env,ordre=#ENV{ordre,ASC},objet=mot}>
|
||||
]
|
||||
<?php } ?>
|
||||
[(#ENV{id_forum}|oui)
|
||||
[(#AUTORISER{voir,forum,#ENV{id_forum}}|oui)
|
||||
[(#ENV{id_article}|oui)
|
||||
<INCLURE{fond=inclure/article-forum,env}/>
|
||||
]
|
||||
|
@ -23,6 +22,7 @@
|
|||
<INCLURE{fond=inclure/forum_discussion,env}/>
|
||||
]
|
||||
]
|
||||
]
|
||||
|
||||
<B_articles>
|
||||
<div class="row liste-articles">
|
||||
|
|
|
@ -13,9 +13,11 @@
|
|||
<a class="nav-link ajax nocache" href="[(#URL_PAGE{espace_membre}|parametre_url{id_mot,#ID_MOT})]">#TITRE</a>
|
||||
</li>
|
||||
</BOUCLE_menu_membre>
|
||||
[(#AUTORISER{voir,forum,#CONFIG{balint/id_rub_forum_prive}}|oui)
|
||||
<li class="nav-item [(#ENV{id_forum}|=={#CONFIG{balint/id_rub_forum_prive}}|oui) active]">
|
||||
<a class="nav-link ajax nocache" href="[(#URL_PAGE{espace_membre}||parametre_url{id_forum,#CONFIG{balint/id_rub_forum_prive}})]">Échanges privés</a>
|
||||
</li>
|
||||
]
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
|
@ -35,7 +35,7 @@
|
|||
<a class="nav-link" href="[(#URL_PAGE{association})]">L'association</a>
|
||||
</li>
|
||||
<?php
|
||||
if (isset($GLOBALS['visiteur_session']['statut']) AND $GLOBALS['visiteur_session']['statut']=="6forum") {
|
||||
if (!isset($GLOBALS['visiteur_session']['statut']) OR $GLOBALS['visiteur_session']['statut']=="6forum") {
|
||||
?>
|
||||
<li class="nav-item [(#SI_PAGE{forum_discussion}|oui) active]">
|
||||
<a class="nav-link" href="[(#URL_PAGE{forum_discussion})]">Forum</a>
|
||||
|
@ -51,7 +51,9 @@
|
|||
<BOUCLE_menu_prive(MOTS){id_groupe=#CONFIG{balint/id_mots_espace_membre}}{par id_mot}{tout}>
|
||||
<a class="dropdown-item" href="[(#URL_PAGE{espace_membre}|parametre_url{id_mot,#ID_MOT})]">#TITRE</a>
|
||||
</BOUCLE_menu_prive>
|
||||
[(#AUTORISER{voir,forum,#CONFIG{balint/id_rub_forum_prive}}|oui)
|
||||
<a class="dropdown-item" href="[(#URL_PAGE{espace_membre}|parametre_url{id_forum,#CONFIG{balint/id_rub_forum_prive}})]">Échanges privés</a>
|
||||
]
|
||||
</div>
|
||||
</li>
|
||||
<?php } ?>
|
||||
|
|
Loading…
Add table
Reference in a new issue