fix permessi lettura/scrittura in pagina Progetti

update sql x anagrafica (nuovo ruolo super reader,d a completare in DB ETS_PROJ)
This commit is contained in:
Samuele Locatelli
2013-09-13 12:18:10 +02:00
parent 01a009ebdf
commit be097a86d3
9 changed files with 187 additions and 50 deletions
+1
View File
@@ -155,6 +155,7 @@
<ItemGroup>
<Content Include="SQL\ETS-DIP\ETS_WS_00137.sql" />
<Content Include="SQL\ETS-GPW\ETS_GPW-PROJ_00183.sql" />
<Content Include="SQL\ETS_anagrafica\ETS_ANAG_00180.sql" />
<Content Include="SQL\ETS_anagrafica\ETS_ANAG_00170.sql" />
<Content Include="SQL\ETS_PROJ\ETS_PROJ_00202.sql" />
<Content Include="SQL\ETS_PROJ\ETS_PROJ_00199.sql" />
@@ -0,0 +1,177 @@
set xact_abort on
go
begin transaction
go
UPDATE
dbo.Funzioni
SET COD_FUNZIONE=N'PowerReader'
WHERE COD_FUNZIONE=N'GPW_powRea'
go
commit transaction
go
set xact_abort on
go
begin transaction
go
UPDATE dbo.Funzioni SET
Descrizione=N'Utende Power Reader (sola lettura su tutto)'
WHERE COD_FUNZIONE=N'PowerReader'
go
commit transaction
go
set xact_abort on
go
begin transaction
go
INSERT INTO dbo.Diritti
(UtenteAD, codModulo, codFunzione, valore)
VALUES (N'ETS\Administrator', N'PROJ-ETS', N'PowerReader', N'')
UPDATE dbo.Diritti SET
valore=N''
WHERE UtenteAD=N'ETS\Andrea Fuselli' and codModulo=N'PROJ-ETS' and codFunzione=N'CC'
UPDATE dbo.Diritti SET
valore=N''
WHERE UtenteAD=N'ETS\Carlo Piazzalunga' and codModulo=N'PROJ-ETS' and codFunzione=N'CC'
INSERT INTO dbo.Diritti
(UtenteAD, codModulo, codFunzione, valore)
VALUES (N'ETS\Cinzia Giupponi', N'PROJ-ETS', N'PowerReader', N'')
UPDATE dbo.Diritti SET
valore=N''
WHERE UtenteAD=N'ETS\Daniele Togni' and codModulo=N'PROJ-ETS' and codFunzione=N'CC'
UPDATE dbo.Diritti SET
valore=N''
WHERE UtenteAD=N'ETS\Elena Nava' and codModulo=N'PROJ-ETS' and codFunzione=N'CC'
UPDATE dbo.Diritti SET
valore=N''
WHERE UtenteAD=N'ETS\Elena Nava' and codModulo=N'PROJ-ETS' and codFunzione=N'PowerUser'
UPDATE dbo.Diritti SET
valore=N''
WHERE UtenteAD=N'ETS\Elena Nava' and codModulo=N'PROJ-ETS' and codFunzione=N'User'
UPDATE dbo.Diritti SET
valore=N''
WHERE UtenteAD=N'ETS\Enrico Facchinetti' and codModulo=N'PROJ-ETS' and codFunzione=N'CC'
INSERT INTO dbo.Diritti
(UtenteAD, codModulo, codFunzione, valore)
VALUES (N'ETS\Ezechia Gasparini', N'PROJ-ETS', N'PowerReader', N'')
INSERT INTO dbo.Diritti
(UtenteAD, codModulo, codFunzione, valore)
VALUES (N'ETS\G. Parietti', N'PROJ-ETS', N'PowerReader', N'')
UPDATE dbo.Diritti SET
valore=N''
WHERE UtenteAD=N'ETS\Gianpietro Locatelli' and codModulo=N'PROJ-ETS' and codFunzione=N'CC'
INSERT INTO dbo.Diritti
(UtenteAD, codModulo, codFunzione, valore)
VALUES (N'ETS\Laura Baroni', N'PROJ-ETS', N'PowerReader', N'')
UPDATE dbo.Diritti SET
valore=N''
WHERE UtenteAD=N'ETS\Luca Begnis' and codModulo=N'PROJ-ETS' and codFunzione=N'CC'
UPDATE dbo.Diritti SET
valore=N''
WHERE UtenteAD=N'ETS\Luca Bentoglio' and codModulo=N'PROJ-ETS' and codFunzione=N'CC'
UPDATE dbo.Diritti SET
valore=N''
WHERE UtenteAD=N'ETS\Marco Bergami' and codModulo=N'PROJ-ETS' and codFunzione=N'CC'
UPDATE dbo.Diritti SET
valore=N''
WHERE UtenteAD=N'ETS\Matteo Cugini' and codModulo=N'PROJ-ETS' and codFunzione=N'CC'
UPDATE dbo.Diritti SET
valore=N''
WHERE UtenteAD=N'ETS\Maurizio Molteni' and codModulo=N'PROJ-ETS' and codFunzione=N'CC'
UPDATE dbo.Diritti SET
valore=N''
WHERE UtenteAD=N'ETS\Maurizio Molteni' and codModulo=N'PROJ-ETS' and codFunzione=N'PowerUser'
UPDATE dbo.Diritti SET
valore=N''
WHERE UtenteAD=N'ETS\Maurizio Molteni' and codModulo=N'PROJ-ETS' and codFunzione=N'User'
UPDATE dbo.Diritti SET
valore=N''
WHERE UtenteAD=N'ETS\Nino Romano' and codModulo=N'PROJ-ETS' and codFunzione=N'CC'
UPDATE dbo.Diritti SET
valore=N''
WHERE UtenteAD=N'ETS\Paolo Beretta' and codModulo=N'PROJ-ETS' and codFunzione=N'CC'
INSERT INTO dbo.Diritti
(UtenteAD, codModulo, codFunzione, valore)
VALUES (N'ETS\Romina Ravasio', N'PROJ-ETS', N'PowerReader', N'')
UPDATE dbo.Diritti SET
valore=N''
WHERE UtenteAD=N'ETS\SQLService' and codModulo=N'PROJ-ETS' and codFunzione=N'PowerUser'
UPDATE dbo.Diritti SET
valore=N''
WHERE UtenteAD=N'ETS\SQLService' and codModulo=N'PROJ-ETS' and codFunzione=N'User'
INSERT INTO dbo.Diritti
(UtenteAD, codModulo, codFunzione, valore)
VALUES (N'ETS\steamware', N'PROJ-ETS', N'PowerReader', N'')
go
commit transaction
go
set xact_abort on
go
begin transaction
go
UPDATE dbo.Diritti SET
valore=N''
WHERE UtenteAD=N'STEAMWAREWIN\Ermanno' and codModulo=N'WebScip' and codFunzione=N'PowerUser'
UPDATE dbo.Diritti SET
valore=N''
WHERE UtenteAD=N'STEAMWAREWIN\giancarlo' and codModulo=N'WebScip' and codFunzione=N'PowerUser'
UPDATE dbo.Diritti SET
valore=N''
WHERE UtenteAD=N'STEAMWAREWIN\Marco' and codModulo=N'WebScip' and codFunzione=N'PowerUser'
UPDATE dbo.Diritti SET
valore=N''
WHERE UtenteAD=N'STEAMWAREWIN\Samuele' and codModulo=N'GPW' and codFunzione=N'GPW_admin'
UPDATE dbo.Diritti SET
valore=N''
WHERE UtenteAD=N'STEAMWAREWIN\Samuele' and codModulo=N'GPW' and codFunzione=N'GPW_user'
UPDATE dbo.Diritti SET
valore=N''
WHERE UtenteAD=N'STEAMWAREWIN\samuele' and codModulo=N'PROJ-ETS' and codFunzione=N'PowerUser'
UPDATE dbo.Diritti SET
valore=N''
WHERE UtenteAD=N'STEAMWAREWIN\samuele' and codModulo=N'PROJ-ETS' and codFunzione=N'User'
UPDATE dbo.Diritti SET
valore=N''
WHERE UtenteAD=N'STEAMWAREWIN\samuele' and codModulo=N'WebScip' and codFunzione=N'PowerUser'
UPDATE dbo.Diritti SET
valore=N''
WHERE UtenteAD=N'STEAMWAREWIN\samuele' and codModulo=N'WebScip' and codFunzione=N'PowerUserRed'
UPDATE dbo.Diritti SET
valore=N''
WHERE UtenteAD=N'STEAMWAREWIN\samuele' and codModulo=N'WebScip' and codFunzione=N'User'
UPDATE dbo.Diritti SET
valore=N''
WHERE UtenteAD=N'STEAMWAREWIN\samuele' and codModulo=N'WebScip' and codFunzione=N'UserRed'
UPDATE dbo.Diritti SET
valore=N''
WHERE UtenteAD=N'STEAMWAREWIN\user' and codModulo=N'WebScip' and codFunzione=N'User'
go
commit transaction
go
-- registro versione...
INSERT INTO [dbo].[LogUpdateDb] ([Versione],[Data]) VALUES(180, GETDATE())
GO
SELECT TOP 10 * FROM LogUpdateDb ORDER BY Versione DESC
GO
+1 -1
View File
@@ -26,7 +26,7 @@
<add key="appName" value="PROJ-ETS" />
<add key="SiteName" value="ETS" />
<add key="mainRev" value="0.9" />
<add key="minRev" value="205" />
<add key="minRev" value="206" />
<add key="stdEmail" value="info@steamware.net" />
<add key="_safePages" value="Default.aspx#unauthorized.aspx#forceUser.aspx#login.aspx#test.aspx#Test.aspx" />
<!--area gestione auth cookie-->
@@ -29,8 +29,6 @@
<div class="divSx">
<asp:ImageButton ID="imgSelect" runat="server" CausesValidation="False" CommandName="Select" ToolTip="Seleziona" ImageUrl="../images/view_m.png" Visible='<%# (isAncestor(Eval("idxFaseAncest")) && showSelect) || (!isAncestor(Eval("idxFaseAncest")) && showSelectSub)%>' />
<asp:ImageButton ID="imgEdit" runat="server" CausesValidation="False" CommandName="Edit" ToolTip="Modifica" ImageUrl="../images/edit_m.png" Visible='<%# isWritable() && showEdit %>' />
</div>
<div class="divDx">
<asp:ImageButton ID="imgDettComm" runat="server" CausesValidation="False" CommandArgument="dettComm" CommandName="Update"
ToolTip="Dati Commessa" ImageUrl="../images/naviga_m.png" OnClick="imgDettComm_Click" Visible='<%# isAncestor(Eval("idxFaseAncest")) && enableJump%>' />
<asp:ImageButton ID="imgDettFasi" runat="server" CausesValidation="False" CommandArgument="dettFasi" CommandName="Update"
@@ -144,7 +142,6 @@
<div class="divDx">
<asp:ImageButton ID="imgAddNew" runat="server" CausesValidation="False" CommandName="Select" ImageUrl="../images/newBlu_m.png"
CommandArgument='<%# Eval("idxFase") %>' OnClick="btnNew_Click" ToolTip="Aggiungi Fase a commessa" Visible='<%# isAncestor(Eval("idxFaseAncest")) && enableNew %>' />
&nbsp;
<asp:ImageButton ID="imgDelete" runat="server" CausesValidation="False" CommandArgument='<%# Eval("idxFase") %>' CommandName="Delete"
ImageUrl="../images/elimina_m.png" ToolTip="Delete" Visible='<%# delEnabled(Eval("idxFase")) && showEdit %>' OnClientClick="return confirm('Confermi eliminazione record?')" />
</div>
@@ -361,19 +361,8 @@ namespace PROJ_ETS.WebUserControls
/// <returns></returns>
public bool delEnabled(object idxObj)
{
bool answ = isWritable();
// solo se ha diritti scrittura controllo
if (answ)
{
// la cancellazione è SEMPRE logica, x cui controllo che si veda solo se è attivo...
try
{
answ = DataProxy_ProjEts.DP.taAF.getByIdx(Convert.ToInt32(idxObj))[0].Attivo;
}
catch
{ }
}
return answ;
// mi basta sia scrivibile (la query decide se cancellare o disattivare progetto...)
return isWritable();
}
/// <summary>
/// calcola classe css dato codice fase
@@ -615,12 +604,12 @@ namespace PROJ_ETS.WebUserControls
/// <returns></returns>
public bool isWritable()
{
bool answ = true;
bool answ = false;
if (_paginaCorrente == null)
{
PagCorrente();
}
//answ = user_std.UtSn.isPageWriteEnabled(_paginaCorrente);
answ = user_std.UtSn.isPageWriteEnabled(_paginaCorrente);
return answ;
}
/// <summary>
@@ -153,16 +153,6 @@
<FooterTemplate>
</FooterTemplate>
</asp:TemplateField>
<%-- <asp:TemplateField HeaderText="budgetMoney" SortExpression="budgetMoney">
<ItemTemplate>
<asp:Label ID="lblbudgetMoney" runat="server" Text='<%# Eval("budgetMoney","{0:#,###.##}€") %>' />
</ItemTemplate>
<EditItemTemplate>
<asp:Label ID="lblbudgetMoney" runat="server" Text='<%# Eval("budgetMoney","{0:#,###.##}€") %>' />
</EditItemTemplate>
<FooterTemplate>
</FooterTemplate>
</asp:TemplateField>--%>
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Wrap="false">
<ItemTemplate>
<asp:ImageButton ID="imgDelete" runat="server" CausesValidation="False" CommandArgument='<%# Eval("idxProgetto") %>' CommandName="Delete"
@@ -264,25 +264,8 @@ namespace PROJ_ETS.WebUserControls
/// <returns></returns>
public bool delEnabled(object idxObj)
{
bool answ = isWritable();
// solo se ha diritti scrittura controllo
if (answ)
{
int trovati = 0;
// !!!FARE!!!
#if false
// controllo se ci siano tipo celle associate
trovati = MagClass.magazzino.taTipoCella.getByCodMag(utils.obj.StringSessionObj("CodCS"), idxObj.ToString()).Rows.Count;
// controllo se ci siano blocchi associati
trovati = trovati + MagClass.magazzino.taBlocchi.getByCodMag(utils.obj.StringSessionObj("CodCS"), idxObj.ToString()).Rows.Count;
#endif
// controllo se ci sono record correlati...
if (trovati > 0)
{
answ = false;
}
}
return answ;
// mi basta sia scrivibile (la query decide se cancellare o disattivare progetto...)
return isWritable();
}
/// <summary>
/// evento selezione!
@@ -457,12 +440,12 @@ namespace PROJ_ETS.WebUserControls
/// <returns></returns>
public bool isWritable()
{
bool answ = true;
bool answ = false;
if (_paginaCorrente == null)
{
PagCorrente();
}
//answ = user_std.UtSn.isPageWriteEnabled(_paginaCorrente);
answ = user_std.UtSn.isPageWriteEnabled(_paginaCorrente);
return answ;
}
/// <summary>
Binary file not shown.
Binary file not shown.